I am adding a image and hyperlink annotation to each page of a document, and have a issue where I encounter a "error exists on this page" in adobe reader after using Aspose to make the modification. The pdf seems to behave fine otherwise, and other readers seem to open it without complaint.
Error from Adobe Reader X:
An error exists on this page. Adobe may not display the page correctly. Please contact the person who created the PDF document to correct the problem.
I am running the latest update from Dec 12th, however the previous versions of the dlls had the same issue.I stripped my code down to do nothing but loop the pages and call q and Q and the issue still occurs even on a single page PDF so I suspect that is where the issue lies
Version with just q/Q operator causing issue:
using (var pdfDoc = new Aspose.Pdf.Document(msIn))
{
foreach (Page page in pdfDoc.Pages)
{
//using q operator: this operator saves current graphics state
page.Contents.Add(new Operator.q());
//using Q operator: this operator restores graphics state
page.Contents.Add(new Operator.Q());
}
pdfDoc.Save(tmpFilePath);
}
This message was posted using Page2Forum from Add Image in an Existing PDF File - Aspose.Pdf for .NET