PDF::Builder::NamedDestination(3pm) | User Contributed Perl Documentation | PDF::Builder::NamedDestination(3pm) |
PDF::Builder::NamedDestination - Add named destinations (views) to a PDF
$dest = PDF::Builder::NamedDestination->new($pdf, ...)
dest
$dest->dest($page, %opts)
# The XYZ location takes three arguments my $dest1 = PDF::Builder::NamedDestination->new($pdf); $dest->dest($pdf->open_page(1), 'xyz' => [$x, $y, $zoom]); # The Fit location doesn't require any arguments, but one is still # needed for the hash array my $dest2 = PDF::Builder::NamedDestination->new($pdf); $dest->dest($pdf->open_page(2), 'fit' => 1);
See "Page Fit Options" in PDF::Builder::Docs for a listing of the available locations and their syntax.
"xyz" is the default fit setting, with position (left and top) and zoom the same as the calling page's.
link, goto
$dest->link($page, %opts)
Parameters are as described in "dest".
Alternate name: "goto"
Originally this method was "link", but recently PDF::API2 changed the name to "goto". "goto" is added for compatibility.
uri, url
$dest->uri($url)
Alternate name: "url"
Originally this method was "url", but recently PDF::API2 changed the name to "uri". "url" is retained for compatibility.
launch, file
$dest->launch($file)
Alternate name: "file"
Originally this method was "file", but recently PDF::API2 changed the name to "launch". "file" is retained for compatibility.
pdf, pdf_file, pdfile
$dest->pdf($pdf_file, $pagenum, %opts)
Alternate names: "pdf_file" and "pdfile"
Originally this method was "pdfile", and had been earlier renamed to "pdf_file", but recently PDF::API2 changed the name to "pdf". "pdfile" and "pdf_file" are retained for compatibility. Note that the position and zoom information is still given as a hash element in PDF::Builder, while PDF::API2 has changed to a position string and an array of dimensions.
2023-12-15 | perl v5.36.0 |