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 756 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!