PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 4:36 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Jun 25, 2010 3:29 pm 
Offline

Joined: Fri Jun 25, 2010 2:56 pm
Posts: 1
Hello,

The attached PDF file (not generated by PDFsharp) becomes corrupted by simply opening it, creating an XGraphics object on all pages and saving it as a new file.
Code:
PdfDocument PdfDoc = PdfReader.Open(...);
...
XGraphics.FromPdfPage(page, XGraphicsPdfPageOptions.Append);
...
gfx.Dispose();
PdfDoc.Save(...);

Attachment:
test-file.zip [213.56 KiB]
Downloaded 501 times

When loading the new file into adobe, this error appears:

An Error exists on this page. Acrobat may not display the page correctly. Please...

In addition, the exported file is much smaller than the original one.

I do not want to modify the existing content, I just want to print a watermark on it.
Is there another way to do that?

Thanks!


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 55 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