We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Using q and Q operator causes adobe reader "error exists on this page"

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

Hi Dan,

Thank you for providing us the sample code and details of your issue.

Please share your template PDF file with us as well. This will help us identify the issue soon.

Sorry for the inconvenience,

Here is a pdf that can demonstrates the issue when used with the sample code i sent. It's a simple scanned document that had been OCRed previously.

Hi Dan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for sharing the template file.

I am able to reproduce your mentioned issue. Your issue has been registered in our issue tracking system with issue id: PDFNEWNET-33132. You will be notified via this forum thread regarding any update against your issue.

Sorry for the inconvenience,

I have been able to work around part of my requirments by using imagestamp and adjusting the zoom scale to meet my placement requirement.

I had used the ximage since I needed to find the insertion rectange for the hyperlink anyway. However, I have another more complicated implemention that the ximage implementation is better suited for. Regardless -- just posting about using ImageStamp as it may help someone else work around the issue for now.

The issues you have found earlier (filed as PDFNEWNET-33132) have been fixed in Aspose.Pdf for .NET 9.2.0.

The blog post for this release is created over this link


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.