1PDF::API2::NamedDestinaUtsieorn(C3o)ntributed Perl DocumPeDnFt:a:tAiPoIn2::NamedDestination(3)
2
3
4

NAME

6       PDF::API2::NamedDestination - Add named destinations (views) to a PDF
7

METHODS

9   new
10           $destination = PDF::API2::NamedDestination->new($pdf, ...);
11
12       Creates a new named destination object.  If any additional arguments
13       are present, they will be passed to "destination()".
14
15   destination
16           $destination = $destination->destination($page, $location, @args);
17
18       A destination is a particular view of a PDF, consisting of a page
19       object, the location of the window on that page, and possible
20       coordinate and zoom arguments.
21
22           # The XYZ location takes three arguments
23           my $dest1 = PDF::API2::NamedDestination->new($pdf);
24           $dest->destination($pdf->open_page(1), 'xyz' => ($x, $y, $zoom));
25
26           # The Fit location doesn't require any arguments
27           my $dest2 = PDF::API2::NamedDestination->new($pdf);
28           $dest->destination($pdf->open_page(2), 'fit');
29
30       The following locations are available:
31
32       •   xyz ($left, $top, $zoom)
33
34           Display the page with the coordinates ($left, $top) positioned at
35           the upper-left corner of the window and the contents of the page
36           magnified by the factor $zoom. An "undef" value for any of the
37           arguments specifies that the current value of that argument shall
38           be retained unchanged.  A zoom factor of 0 has the same meaning as
39           "undef".
40
41       •   fit
42
43           Display the page with its contents magnified just enough to fit the
44           entire page within the window both horizontally and vertically. If
45           the required horizontal and vertical magnification factors are
46           different, use the smaller of the two, centering the page within
47           the window in the other dimension.
48
49       •   fith ($top)
50
51           Display the page with the vertical coordinate $top positioned at
52           the top edge of the window and the contents of the page magnified
53           just enough to fit the entire width of the page within the window.
54           An "undef" value for $top specifies that the current value of that
55           argument shall be retained unchanged.
56
57       •   fitv ($left)
58
59           Display the page with the horizontal coordinate $left positioned at
60           the left edge of the window and the contents of the page magnified
61           just enough to fit the entire height of the page within the window.
62           An "undef" value for $left specifies that the current value of that
63           argument shall be retained unchanged.
64
65       •   fitr ($left, $bottom, $right, $top)
66
67           Display the page with its contents magnified just enough to fit the
68           rectangle specified by the coordinates $left, $bottom, $right, and
69           $top entirely within the window both horizontally and vertically.
70           If the required horizontal and vertical magnification factors are
71           different, use the smaller of the two, centering the rectangle
72           within the window in the other dimension.
73
74       •   fitb
75
76           Display the page with its contents magnified just enough to fit its
77           bounding box entirely within the window both horizontally and
78           vertically. If the required horizontal and vertical magnification
79           factors are different, use the smaller of the two, centering the
80           bounding box within the window in the other dimension.
81
82       •   fitbh ($top)
83
84           Display the page with the vertical coordinate $top positioned at
85           the top edge of the window and the contents of the page magnified
86           just enough to fit the entire width of its bounding box within the
87           window.  An "undef" value for $top specifies that the current value
88           of that argument shall be retained unchanged.
89
90       •   fitbv ($left)
91
92           Display the page with the horizontal coordinate $left positioned at
93           the left edge of the window and the contents of the page magnified
94           just enough to fit the entire height of its bounding box within the
95           window.  An "undef" value for $left specifies that the current
96           value of that argument shall be retained unchanged.
97
98   goto
99           $destination = $destination->goto($page, $location, @args);
100
101       A go-to action changes the view to a specified destination (page,
102       location, and magnification factor).
103
104       Parameters are as described in "destination".
105
106   uri
107           $destination = $destination->uri($uri);
108
109       A URI action indicates that a URI -- typically a web page -- should be
110       launched.
111
112   launch
113           $destination = $destination->launch($file);
114
115       A launch action runs an application or opens or prints a document.
116
117       $file contains the path to the application to be launched or the
118       document to be opened or printed.
119
120   pdf
121           $destination = $destination->pdf($file, $page_number, $location, @args);
122
123       Similar to "goto", but the destination is in a different PDF file
124       located at $file.  $page_number is an integer rather than a page
125       object, and the other parameters are as described in "destination".
126
127
128
129perl v5.36.0                      2022-07-22    PDF::API2::NamedDestination(3)
Impressum