PDFsharp & MigraDoc Foundation https://forum.pdfsharp.net/ |
|
Problem with image (GIF) importing https://forum.pdfsharp.net/viewtopic.php?f=3&t=403 |
Page 1 of 1 |
Author: | PapaCarlo [ Mon Jun 09, 2008 6:42 pm ] |
Post subject: | Problem with image (GIF) importing |
Hello everybody! I have found bug when I try to import pages with specific image to the new PDF document. For reproduce it you should to download document by the follow link: http://ostap.org.ua/bug.pdf and execute folow code: Code: string srcDocPath = ...; // path to the downloaded document;
string dstDocPath = ...; // path to the output document; using (PdfDocument dstDoc = new PdfDocument(dstDocPath)) try { PdfPage page; using (XPdfForm srcDoc = XPdfForm.FromFile(srcDocPath)) for (srcDoc.PageNumber = 1; srcDoc.PageNumber <= srcDoc.PageCount; srcDoc.PageNumber++) { page = dstDoc.AddPage(); using (XGraphics gfx = XGraphics.FromPdfPage(page)) { gfx.DrawImage(srcDoc, new XRect(0, 0, (double)srcDoc.Page.Width, (double)srcDoc.Page.Height)); } page.Close(); } } finally { dstDoc.Close(); } After execution we will have result document with corrupted image. Best Regards, Artem |
Author: | Thomas Hoevel [ Tue Jun 10, 2008 8:52 am ] |
Post subject: | |
Hello! I cannot download the PDF file. Maybe there's something wrong with the link. |
Author: | PapaCarlo [ Tue Jun 10, 2008 12:12 pm ] |
Post subject: | |
Please try from there: http://ostap.org.ua/bug.pdf |
Author: | Thomas Hoevel [ Tue Jun 10, 2008 12:41 pm ] |
Post subject: | |
Hello! I tested your file and your code with the current internal build of PDFsharp - and it worked without problem. I hope you can wait a few days until PDFsharp 1.2 comes out. |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |