.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "PDF::Builder::NamedDestination 3pm" .TH PDF::Builder::NamedDestination 3pm "2023-01-24" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" PDF::Builder::NamedDestination \- Add named destinations (views) to a PDF .SH "METHODS" .IX Header "METHODS" .ie n .IP "$dest = PDF::Builder::NamedDestination\->new($pdf, ...)" 4 .el .IP "\f(CW$dest\fR = PDF::Builder::NamedDestination\->new($pdf, ...)" 4 .IX Item "$dest = PDF::Builder::NamedDestination->new($pdf, ...)" Creates a new named destination object. Any optional additional arguments will be passed on to \f(CW\*(C`destination\*(C'\fR. .SS "Destination types" .IX Subsection "Destination types" .ie n .IP "$dest\->dest($page, %opts)" 4 .el .IP "\f(CW$dest\fR\->dest($page, \f(CW%opts\fR)" 4 .IX Item "$dest->dest($page, %opts)" A destination (dest) is a particular view of a \s-1PDF,\s0 consisting of a page object, the location of the window on that page, and possible coordinate and zoom arguments. .Sp .Vb 3 \& # The XYZ location takes three arguments \& my $dest1 = PDF::Builder::NamedDestination\->new($pdf); \& $dest\->dest($pdf\->open_page(1), \*(Aqxyz\*(Aq => [$x, $y, $zoom]); \& \& # The Fit location doesn\*(Aqt 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), \*(Aqfit\*(Aq => 1); .Ve .Sp See \*(L"Page Fit Options\*(R" in PDF::Builder::Docs for a listing of the available locations and their syntax. .Sp \&\*(L"xyz\*(R" is the \fBdefault\fR fit setting, with position (left and top) and zoom the same as the calling page's. .SS "Target Destinations" .IX Subsection "Target Destinations" .ie n .IP "$dest\->link($page, %opts)" 4 .el .IP "\f(CW$dest\fR\->link($page, \f(CW%opts\fR)" 4 .IX Item "$dest->link($page, %opts)" A go-to (link) action changes the view to a specified destination (page, location, and magnification factor). .Sp Parameters are as described in \f(CW\*(C`dest\*(C'\fR. .Sp \&\fBAlternate name:\fR \f(CW\*(C`goto\*(C'\fR .Sp Originally this method was \f(CW\*(C`link\*(C'\fR, but recently \s-1PDF::API2\s0 changed the name to \f(CW\*(C`goto\*(C'\fR. \*(L"goto\*(R" is added for compatibility. .ie n .IP "$dest\->uri($url)" 4 .el .IP "\f(CW$dest\fR\->uri($url)" 4 .IX Item "$dest->uri($url)" Defines the destination as launch-url with uri \f(CW$url\fR. .Sp \&\fBAlternate name:\fR \f(CW\*(C`url\*(C'\fR .Sp Originally this method was \f(CW\*(C`url\*(C'\fR, but recently \s-1PDF::API2\s0 changed the name to \f(CW\*(C`uri\*(C'\fR. \*(L"url\*(R" is retained for compatibility. .ie n .IP "$dest\->launch($file)" 4 .el .IP "\f(CW$dest\fR\->launch($file)" 4 .IX Item "$dest->launch($file)" Defines the destination as launch-file with filepath \f(CW$file\fR and page-fit options \f(CW%opts\fR. The target application is run. Note that this is \&\fBnot\fR a \s-1PDF\s0 \fIor\fR a browser file \*(-- it is a local application. .Sp \&\fBAlternate name:\fR \f(CW\*(C`file\*(C'\fR .Sp Originally this method was \f(CW\*(C`file\*(C'\fR, but recently \s-1PDF::API2\s0 changed the name to \f(CW\*(C`launch\*(C'\fR. \*(L"file\*(R" is retained for compatibility. .ie n .IP "$dest\->pdf($pdf_file, $pagenum, %opts)" 4 .el .IP "\f(CW$dest\fR\->pdf($pdf_file, \f(CW$pagenum\fR, \f(CW%opts\fR)" 4 .IX Item "$dest->pdf($pdf_file, $pagenum, %opts)" Defines the destination as a PDF-file with filepath \f(CW$pdf_file\fR, on page \&\f(CW$pagenum\fR, and options \f(CW%opts\fR (same as \fBdest()\fR). .Sp \&\fBAlternate names:\fR \f(CW\*(C`pdf_file\*(C'\fR and \f(CW\*(C`pdfile\*(C'\fR .Sp Originally this method was \f(CW\*(C`pdfile\*(C'\fR, and had been earlier renamed to \&\f(CW\*(C`pdf_file\*(C'\fR, but recently \s-1PDF::API2\s0 changed the name to \f(CW\*(C`pdf\*(C'\fR. \*(L"pdfile\*(R" and \&\*(L"pdf_file\*(R" are retained for compatibility. \fBNote that\fR the position and zoom information is still given as a hash element in PDF::Builder, while \s-1PDF::API2\s0 has changed to a position string and an array of dimensions.