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.