Document open action is used to set zoom factor for the first page of the PDF document. Zoom factor is controlled with the pre-defined values in DestinationType enumeration. Actually, document open action means that when the PDF document is opened using a PDF viewer like Adobe Acrobat then how the first page of the PDF document should be displayed. Should it fit into the page? etc. DestinationType enumeration helps to obtain different effects.
It is always a two step process:
The pre-defined values of DestinationType enumeration are given below:
Values |
Description |
Retain |
Retains the original type |
FitPage |
Fits the page |
FitWidth |
Fits the width |
FitHeight |
Fits the height |
FitBox |
Fits the box |
Code Snippet
[C#]
//Instantiate Pdf instance
Pdf pdf1 = new Pdf();
//Set the DestinationType property of Pdf instance to any pre-defined value
pdf1.DestinationType = DestinationType.FitPage;
...
[VB.NET]
'Instantiate Pdf instance
Dim pdf1 As Pdf = New Pdf()
'Set the DestinationType property of Pdf instance to any pre-defined value
pdf1.DestinationType = DestinationType.FitPage
...
[Java]
//Instantiate Pdf instance
Pdf pdf1 = new Pdf();
//Set the DestinationType property of Pdf instance to any pre-defined value
pdf1.DestinationType = DestinationType.FitPage;
...
[XML]
<Pdf xmlns="Aspose.Pdf" DestinationType="FitPage">
...
</Pdf>