1PDF::Builder::NamedDestUisneartiCoonn(t3r)ibuted Perl DoPcDuFm:e:nBtuaitlidoenr::NamedDestination(3)
2
3
4
6 PDF::Builder::NamedDestination - Add named destinations (views) to a
7 PDF
8
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, $location, @args)
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 Alternate name: "destination"
36
37 This method was originally "dest()", which PDF::API2 renamed to
38 "destination()". We are keeping the original name, and for partial
39 compatibility, allow "destination" as an alias. Note that the old
40 PDF::API2 (and still, for PDF::Builder), uses a hash element for the
41 location and dimension/zoom information, while the new PDF::API2 uses a
42 string and an array (not supported in PDF::Builder).
43
44 Target Destinations
45 $dest->goto($page, $location, @args)
46 A go-to action changes the view to a specified destination (page,
47 location, and magnification factor).
48
49 Parameters are as described in "destination".
50
51 Alternate name: "link"
52
53 Originally this method was "link", but recently PDF::API2 changed
54 the name to "goto". "link" is retained for compatibility.
55
56 $dest->uri($page, $location, @args)
57 Defines the destination as launch-url with uri $url and page-fit
58 options %opts.
59
60 Alternate name: "url"
61
62 Originally this method was "url", but recently PDF::API2 changed
63 the name to "uri". "url" is retained for compatibility.
64
65 $dest->launch($file, %opts)
66 Defines the destination as launch-file with filepath $file and
67 page-fit options %opts. The target application is run.
68
69 Alternate name: "file"
70
71 Originally this method was "file", but recently PDF::API2 changed
72 the name to "launch". "file" is retained for compatibility.
73
74 $dest->pdf($pdf_file, $pagenum, %opts)
75 Defines the destination as a PDF-file with filepath $pdf_file, on
76 page $pagenum, and options %opts (same as dest()).
77
78 Alternate names: "pdf_file" and "pdfile"
79
80 Originally this method was "pdfile", and had been earlier renamed
81 to "pdf_file", but recently PDF::API2 changed the name to "pdf".
82 "pdfile" and "pdf_file" are retained for compatibility. Note that
83 the position and zoom information is still given as a hash element
84 in PDF::Builder, while PDF::API2 has changed to a position string
85 and an array of dimensions.
86
87
88
89perl v5.36.0 2022-09-13 PDF::Builder::NamedDestination(3)