.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" 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::API2::Annotation 3pm" .TH PDF::API2::Annotation 3pm "2020-10-25" "perl v5.30.3" "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::API2::Annotation \- Add annotations to a PDF .SH "METHODS" .IX Header "METHODS" .ie n .IP "$annotation = PDF::API2::Annotation\->\fBnew()\fR" 4 .el .IP "\f(CW$annotation\fR = PDF::API2::Annotation\->\fBnew()\fR" 4 .IX Item "$annotation = PDF::API2::Annotation->new()" Returns an annotation object (called from \f(CW$page\fR\->\fBannotation()\fR). .ie n .IP "$annotation\->link($page, %options)" 4 .el .IP "\f(CW$annotation\fR\->link($page, \f(CW%options\fR)" 4 .IX Item "$annotation->link($page, %options)" Link the annotation to another page in this \s-1PDF.\s0 .Sp Accepts options \-rect, \-border, and any of the options listed under \fBdest()\fR. .ie n .IP "$annotation\->url($url, %options)" 4 .el .IP "\f(CW$annotation\fR\->url($url, \f(CW%options\fR)" 4 .IX Item "$annotation->url($url, %options)" Launch \f(CW$url\fR when the annotation is selected. .Sp Accepts options \-rect and \-border. .ie n .IP "$annotation\->file($filename, %options)" 4 .el .IP "\f(CW$annotation\fR\->file($filename, \f(CW%options\fR)" 4 .IX Item "$annotation->file($filename, %options)" Open \f(CW$filename\fR when the annotation is selected. .Sp Accepts options \-rect and \-border. .ie n .IP "$annotation\->pdf_file($filename, $page_number, %options)" 4 .el .IP "\f(CW$annotation\fR\->pdf_file($filename, \f(CW$page_number\fR, \f(CW%options\fR)" 4 .IX Item "$annotation->pdf_file($filename, $page_number, %options)" Open the \s-1PDF\s0 file located at \f(CW$filename\fR to the specified page number. .Sp Accepts options \-rect, \-border, and any of the options listed under \fBdest()\fR. .ie n .IP "$annotation\->text($text, %options)" 4 .el .IP "\f(CW$annotation\fR\->text($text, \f(CW%options\fR)" 4 .IX Item "$annotation->text($text, %options)" Define the annotation as a text note with the specified content. .Sp Accepts options \-rect and \-open. .ie n .IP "$annotation\->movie($filename, $content_type, %options)" 4 .el .IP "\f(CW$annotation\fR\->movie($filename, \f(CW$content_type\fR, \f(CW%options\fR)" 4 .IX Item "$annotation->movie($filename, $content_type, %options)" Embed and link to the movie located at \f(CW$filename\fR with the specified \s-1MIME\s0 type. .Sp Accepts a \-rect option. .ie n .IP "$annotation\->rect($llx, $lly, $urx, $ury)" 4 .el .IP "\f(CW$annotation\fR\->rect($llx, \f(CW$lly\fR, \f(CW$urx\fR, \f(CW$ury\fR)" 4 .IX Item "$annotation->rect($llx, $lly, $urx, $ury)" Define the rectangle around the annotation. .ie n .IP "$annotation\->border($horizontal_corner_radius, $vertical_corner_radius, $width)" 4 .el .IP "\f(CW$annotation\fR\->border($horizontal_corner_radius, \f(CW$vertical_corner_radius\fR, \f(CW$width\fR)" 4 .IX Item "$annotation->border($horizontal_corner_radius, $vertical_corner_radius, $width)" Define the border style. Defaults to 0, 0, 1. .ie n .IP "$annotation\->content(@lines)" 4 .el .IP "\f(CW$annotation\fR\->content(@lines)" 4 .IX Item "$annotation->content(@lines)" Define the text content of the annotation, if applicable. .ie n .IP "$annotation\->open($boolean)" 4 .el .IP "\f(CW$annotation\fR\->open($boolean)" 4 .IX Item "$annotation->open($boolean)" Display the annotation either open or closed, if applicable. .ie n .IP "$annotation\->dest( $page, \-fit => 1 )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-fit => 1 )" 4 .IX Item "$annotation->dest( $page, -fit => 1 )" Display the page designated by page, with its contents magnified just enough to fit the entire page within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension. .ie n .IP "$annotation\->dest( $page, \-fith => $top )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-fith => \f(CW$top\fR )" 4 .IX Item "$annotation->dest( $page, -fith => $top )" Display the page designated by page, with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of the page within the window. .ie n .IP "$annotation\->dest( $page, \-fitv => $left )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-fitv => \f(CW$left\fR )" 4 .IX Item "$annotation->dest( $page, -fitv => $left )" Display the page designated by page, with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of the page within the window. .ie n .IP "$annotation\->dest( $page, \-fitr => [ $left, $bottom, $right, $top ] )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-fitr => [ \f(CW$left\fR, \f(CW$bottom\fR, \f(CW$right\fR, \f(CW$top\fR ] )" 4 .IX Item "$annotation->dest( $page, -fitr => [ $left, $bottom, $right, $top ] )" Display the page designated by page, with its contents magnified just enough to fit the rectangle specified by the coordinates left, bottom, right, and top entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the window in the other dimension. .ie n .IP "$annotation\->dest( $page, \-fitb => 1 )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-fitb => 1 )" 4 .IX Item "$annotation->dest( $page, -fitb => 1 )" (\s-1PDF 1.1\s0) Display the page designated by page, with its contents magnified just enough to fit its bounding box entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the bounding box within the window in the other dimension. .ie n .IP "$annotation\->dest( $page, \-fitbh => $top )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-fitbh => \f(CW$top\fR )" 4 .IX Item "$annotation->dest( $page, -fitbh => $top )" (\s-1PDF 1.1\s0) Display the page designated by page, with the vertical coordinate top positioned at the top edge of the window and the contents of the page magnified just enough to fit the entire width of its bounding box within the window. .ie n .IP "$annotation\->dest( $page, \-fitbv => $left )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-fitbv => \f(CW$left\fR )" 4 .IX Item "$annotation->dest( $page, -fitbv => $left )" (\s-1PDF 1.1\s0) Display the page designated by page, with the horizontal coordinate left positioned at the left edge of the window and the contents of the page magnified just enough to fit the entire height of its bounding box within the window. .ie n .IP "$annotation\->dest( $page, \-xyz => [ $left, $top, $zoom ] )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$page\fR, \-xyz => [ \f(CW$left\fR, \f(CW$top\fR, \f(CW$zoom\fR ] )" 4 .IX Item "$annotation->dest( $page, -xyz => [ $left, $top, $zoom ] )" Display the page designated by page, with the coordinates (left, top) positioned at the top-left corner of the window and the contents of the page magnified by the factor zoom. A zero (0) value for any of the parameters left, top, or zoom specifies that the current value of that parameter is to be retained unchanged. .ie n .IP "$annotation\->dest( $name )" 4 .el .IP "\f(CW$annotation\fR\->dest( \f(CW$name\fR )" 4 .IX Item "$annotation->dest( $name )" (\s-1PDF 1.2\s0) Connect the Annotation to a \*(L"Named Destination\*(R" defined elsewhere.