PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Adding an image to a pdf page https://forum.pdfsharp.net/viewtopic.php?f=2&t=2616 |
Page 1 of 1 |
Author: | wayfarer [ Sat Oct 19, 2013 4:37 pm ] |
Post subject: | Adding an image to a pdf page |
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 |
Author: | Thomas Hoevel [ Mon Oct 21, 2013 8:27 am ] |
Post subject: | Re: Adding an image to a pdf page |
Try using gfx.DrawImage(). |
Author: | wayfarer [ Mon Oct 21, 2013 10:40 am ] |
Post subject: | Re: Adding an image to a pdf page |
Thank you, that's got it. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |