PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with image (GIF) importing

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
PapaCarlo



Joined: 09 Jun 2008
Posts: 2
Location: Ukraine

PostPosted: Mon Jun 09, 2008 6:42 pm    Post subject: Problem with image (GIF) importing Reply with quote

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


Last edited by PapaCarlo on Tue Jun 10, 2008 12:13 pm; edited 1 time in total
Back to top
View user's profile Send private message MSN Messenger
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Tue Jun 10, 2008 8:52 am    Post subject: Reply with quote

Hello!

I cannot download the PDF file.
Maybe there's something wrong with the link.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
PapaCarlo



Joined: 09 Jun 2008
Posts: 2
Location: Ukraine

PostPosted: Tue Jun 10, 2008 12:12 pm    Post subject: Reply with quote

Please try from there: http://ostap.org.ua/bug.pdf
Back to top
View user's profile Send private message MSN Messenger
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Tue Jun 10, 2008 12:41 pm    Post subject: Reply with quote

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.
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Bug Reports - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com