1PDF::Builder::NamedDestUisneartiCoonn(t3r)ibuted Perl DoPcDuFm:e:nBtuaitlidoenr::NamedDestination(3)
2
3
4

NAME

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

METHODS

10       $dest = PDF::Builder::NamedDestination->new($pdf, ...)
11           Creates a new named destination object. Any optional additional
12           arguments will be passed on to "destination".
13
14   Destination types
15       $dest->dest($page, %opts)
16           A destination (dest) is a particular view of a PDF, consisting of a
17           page object, the location of the window on that page, and possible
18           coordinate and zoom arguments.
19
20               # The XYZ location takes three arguments
21               my $dest1 = PDF::Builder::NamedDestination->new($pdf);
22               $dest->dest($pdf->open_page(1), 'xyz' => [$x, $y, $zoom]);
23
24               # The Fit location doesn't require any arguments, but one is still
25               # needed for the hash array
26               my $dest2 = PDF::Builder::NamedDestination->new($pdf);
27               $dest->dest($pdf->open_page(2), 'fit' => 1);
28
29           See "Page Fit Options" in PDF::Builder::Docs for a listing of the
30           available locations and their syntax.
31
32           "xyz" is the default fit setting, with position (left and top) and
33           zoom the same as the calling page's.
34
35   Target Destinations
36       $dest->link($page, %opts)
37           A go-to (link) action changes the view to a specified destination
38           (page, location, and magnification factor).
39
40           Parameters are as described in "dest".
41
42           Alternate name: "goto"
43
44           Originally this method was "link", but recently PDF::API2 changed
45           the name to "goto". "goto" is added for compatibility.
46
47       $dest->uri($url)
48           Defines the destination as launch-url with uri $url.
49
50           Alternate name: "url"
51
52           Originally this method was "url", but recently PDF::API2 changed
53           the name to "uri". "url" is retained for compatibility.
54
55       $dest->launch($file)
56           Defines the destination as launch-file with filepath $file and
57           page-fit options %opts. The target application is run. Note that
58           this is not a PDF or a browser file -- it is a local application.
59
60           Alternate name: "file"
61
62           Originally this method was "file", but recently PDF::API2 changed
63           the name to "launch". "file" is retained for compatibility.
64
65       $dest->pdf($pdf_file, $pagenum, %opts)
66           Defines the destination as a PDF-file with filepath $pdf_file, on
67           page $pagenum, and options %opts (same as dest()).
68
69           Alternate names: "pdf_file" and "pdfile"
70
71           Originally this method was "pdfile", and had been earlier renamed
72           to "pdf_file", but recently PDF::API2 changed the name to "pdf".
73           "pdfile" and "pdf_file" are retained for compatibility. Note that
74           the position and zoom information is still given as a hash element
75           in PDF::Builder, while PDF::API2 has changed to a position string
76           and an array of dimensions.
77
78
79
80perl v5.38.0                      2023-07-21 PDF::Builder::NamedDestination(3)
Impressum