PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Jul 01, 2024 4:24 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Oct 19, 2013 4:37 pm 
Offline

Joined: Mon Oct 10, 2011 1:08 pm
Posts: 6
Hi. I am trying to add an image to a document. The text goes in very nicely, but the image seems to flicker briefly in the top left corner of the screen but is not on the resulting page.

VB.net code:
Code:
            'Print image:
            gfx = XGraphics.FromPdfPage(gPage)
            gfx.Graphics.DrawImage(Image.FromFile(mstrAppPath & "Images\scissors left.jpg"), 100, 200)


and this code appears within the code block that successfully writes the text - but no image. The image *is* present at that location.

What am I doing wrong? Thank you.

Net Framework 2.0, VS 2010, Windows 8


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 8:27 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Try using gfx.DrawImage().

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Oct 21, 2013 10:40 am 
Offline

Joined: Mon Oct 10, 2011 1:08 pm
Posts: 6
Thank you, that's got it.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 41 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group