Setting the Document Magnification to Default

Hello,

I want to set document magnification as

“Default”. The code as follows:-

if (pdfDocument.OpenAction != null)
{
XYZExplicitDestination xyz =

(pdfDocument.OpenAction as GoToAction).Destination

as XYZExplicitDestination;
if (xyz == null)
{
ExplicitDestination expdest =

(pdfDocument.OpenAction as GoToAction).Destination

as ExplicitDestination;
XYZExplicitDestination xyznew = new

XYZExplicitDestination(expdest.PageNumber, 0.0,

0.0, 0.0);
((pdfDocument.OpenAction as

GoToAction).Destination) = xyznew;
}
else if ((xyz).Zoom > 0.1)
{
XYZExplicitDestination xyznew = new

XYZExplicitDestination(xyz.PageNumber, xyz.Left,

xyz.Top, 0.0);
((pdfDocument.OpenAction as

GoToAction).Destination) = xyznew;
}
}

With this, It shows Document Magnification as

“Default”. But if we run Preflight PDF Syntax

issues for the document, it shows Generatl file

format error

The array element at index 0 is of incorrect

type
Value: 2
Type: CosInteger
Formal Representation: Dest
Traversal Path ->OpenAction->D

The value at index 0 must be an indirect object
Value: 2
Type: CosInteger
Formal Representation: Dest
Traversal Path->OpenAction->D

Please help me to solve the issue.

I have attached files. Table of Content.pdf is the document before applying magnification.



After changing magnification as Default is after setting magnification as default using Aspose pdf.

Hi Chenna,


Thanks for your inquiry. I have checked your output PDF file with Adobe Acrobat XI preflight utility. But I am afraid I am unable to notice any issue, please find screenshot for reference. Can you please try latest version of Adobe and share the results.

We are sorry for the inconvenience caused.

Best Regards,

Thanks for the response. We have Adobe Acrobat 10 Professional. Aspose.pdf version is 10.4 We still see preflight syntax errors in Adobe Acrobat 10 for Document Magnification and Links/Bookmarks Magnification. Please find attached screen shot (Preflight error.jpg) from Acrobat 10 Pro.



Is there any work around, not to report syntax errors in Acrobat-10 unless there is specific reason to use Acrobat-XI for preflight check



We treat Acrobat-X is a industry stable version to verify any PDF related issues.

Hi Chenna,


Thanks for sharing the screenshot. Please note these are warnings messages, you can use document without any issue. However we have logged an investigation ticket PDFNEWNET-38755 in our issue tracking system for further investigation. We will keep you updated about the issue resolution progress.

Best Regards,