.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (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 .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . 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::Basic::PDF::Pages 3" .TH PDF::API2::Basic::PDF::Pages 3 2023-12-21 "perl v5.38.1" "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::Basic::PDF::Pages \- Low\-level page tree object .SH DESCRIPTION .IX Header "DESCRIPTION" A Pages object is the parent to other pages objects or to page objects themselves. .SH METHODS .IX Header "METHODS" .ie n .SS "PDF::API2::Basic::PDF::Pages\->new($pdf, $parent)" .el .SS "PDF::API2::Basic::PDF::Pages\->new($pdf, \f(CW$parent\fP)" .IX Subsection "PDF::API2::Basic::PDF::Pages->new($pdf, $parent)" This creates a new Pages object in a PDF. Notice that \f(CW$parent\fR here is not the file context for the object but the parent pages object for this pages. If we are using this class to create a root node, then \&\f(CW$parent\fR should point to the file context, which is identified by not having a Type of Pages. \f(CW$pdf\fR is the file object (or a reference to an array of file objects) in which to create the new Pages object. .ie n .SS $p\->find_page($page_number) .el .SS \f(CW$p\fP\->find_page($page_number) .IX Subsection "$p->find_page($page_number)" Returns the given page, using the page count values in the pages tree. Pages start at 0. .ie n .SS "$p\->add_page($page, $page_number)" .el .SS "\f(CW$p\fP\->add_page($page, \f(CW$page_number\fP)" .IX Subsection "$p->add_page($page, $page_number)" Inserts the page before the given \f(CW$page_number\fR. \f(CW$page_number\fR can be negative to count from the END of the document. \-1 is after the last page. Likewise \&\f(CW$page_number\fR can be greater than the number of pages currently in the document, to append. .ie n .SS "@objects = $p\->\fBget_pages()\fP" .el .SS "\f(CW@objects\fP = \f(CW$p\fP\->\fBget_pages()\fP" .IX Subsection "@objects = $p->get_pages()" Returns a list of page objects in the document in page order .ie n .SS $p\->find_prop($key) .el .SS \f(CW$p\fP\->find_prop($key) .IX Subsection "$p->find_prop($key)" Searches up through the inheritance tree to find a property. .ie n .SS "$p\->add_font($pdf, $font)" .el .SS "\f(CW$p\fP\->add_font($pdf, \f(CW$font\fP)" .IX Subsection "$p->add_font($pdf, $font)" Creates or edits the resource dictionary at this level in the hierarchy. If the font is already supported even through the hierarchy, then it is not added. .ie n .SS "$p\->bbox($xmin, $ymin, $xmax, $ymax, [$param])" .el .SS "\f(CW$p\fP\->bbox($xmin, \f(CW$ymin\fP, \f(CW$xmax\fP, \f(CW$ymax\fP, [$param])" .IX Subsection "$p->bbox($xmin, $ymin, $xmax, $ymax, [$param])" Specifies the bounding box for this and all child pages. If the values are identical to those inherited then no change is made. \f(CW$param\fR specifies the attribute name so that other 'bounding box'es can be set with this method. .ie n .SS $p\->proc_set(@entries) .el .SS \f(CW$p\fP\->proc_set(@entries) .IX Subsection "$p->proc_set(@entries)" Ensures that the current resource contains all the entries in the proc_sets listed. If necessary it creates a local resource dictionary to achieve this. .ie n .SS $p\->get_top .el .SS \f(CW$p\fP\->get_top .IX Subsection "$p->get_top" Returns the top of the pages tree