Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
11.3
11.4
Statistic
FMM
Blog
Adds a page link to the current open page.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 7.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
PosX | X-Coordinate of bounding rectangle | 100 | |
PosY | Y-Coordinate of bounding rectangle | 100 | |
Width | Width of bounding rectangle | 100 | |
Height | Height of bounding rectangle | 20 | |
DestinationType | The destination type. | ||
DestPage | The destination page number. | 5 | |
a | First parameter for destination type. | Optional | |
b | Second parameter for destination type. | Optional | |
c | Third parameter for destination type. | Optional | |
d | Forth parameter for destination type. | Optional |
Returns OK or error.
Destination type | Description |
XYZoom | Display the page designated by page with the coordinates (left top) positioned at the top-left corner of the window and the contents of the page magnified by the factor zoom. A zero value for any of the parameters left top or zoom specifies that the current value of that parameter is to be retained unchanged. |
Fit | Display the page designated by page with its contents magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension. This destination type has no parameters. |
FitHTop | Display the page designated by page with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of the page within the window. |
FitVLeft | Display the page designated by page with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window. |
FitRect | Display the page designated by page with its contents magnified just enough to fit the rectangle specified by the coordinates left bottom right and top entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the window in the other dimension. |
See also PageLinkEx function in DynaPDF manual.
Add various links to a page:
# import page
Set Variable [$r; Value:MBS("DynaPDF.OpenPDFFromContainer"; $pdf; Add Page Numbers::Input)]
Set Variable [$r; Value:MBS("DynaPDF.ImportPDFFile"; $pdf; 1)]
# edit first page
Set Variable [$r; Value:MBS("DynaPDF.EditPage"; $pdf; 1)]
Set Variable [$r; Value:MBS( "DynaPDF.SetFont"; $pdf; "Helvetica"; 0; 20)]
#Add web link
Set Variable [$r; Value:MBS( "DynaPDF.WriteFTextEx"; $PDF; 100; 100; 150; 20; "left"; "Go to MBS Blog" )]
Set Variable [$r; Value:MBS( "DynaPDF.WebLink"; $PDF; 100; 80; 150; 20; "http://www.mbs-plugins.com/" )]
#Add page link
Set Variable [$r; Value:MBS( "DynaPDF.WriteFTextEx"; $PDF; 100; 150; 150; 20; "left"; "Jump to page 3" )]
Set Variable [$r; Value:MBS( "DynaPDF.PageLink"; $PDF; 100; 130; 150; 20; 3)]
#Add page link with more options
Set Variable [$r; Value:MBS( "DynaPDF.WriteFTextEx"; $PDF; 100; 200; 200; 20; "left"; "Jump to Letter D Zoomed" )]
Set Variable [$r; Value:MBS( "DynaPDF.PageLinkEx"; $PDF; 100; 180; 200; 20; "FitRect"; 4; 60; 590; 135; 160)]
# Close page
Set Variable [$r; Value:MBS("DynaPDF.EndPage"; $pdf)]
Created 18th December 2016, last changed 9th December 2019
DynaPDF.PageLink - DynaPDF.PageStatistics
Feedback: Report problem or ask question.