Text::PDF::Pages - a PDF pages hierarchical element. Inherits from the Text::PDF::Dict manpage A Pages object is the parent to other pages objects or to page objects themselves.

Text::PDF::Pages->new($parent)
This creates a new Pages object. Notice that $parent 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 $parent should point to the file context, which is identified by not having a Type of Pages.

$p->out_obj($isnew)
Tells all the files that this thing is destined for that they should output this object come time to output. If this object has no parent, then it must be the root. So set as the root for the files in question and tell it to be output too. If $isnew is set, then call new_obj rather than out_obj to create as a new object in the file.

$p->add_page($page, $index)
Appends a page to this pages object. This subroutine only handles adding pages at the end of the list. But it does at least make sure there is only 8 entries in any pages list, and keep track of all the counts etc. $index, if set, specifies the page number that the page should be inserted before. If 0, the page is appended to the file. If -ve then counts from the end.

$p->find_prop($key)
Searches up through the inheritance tree to find a property.

$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.

$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. $param specifies the attribute name so that other 'bounding box'es can be set with this method.

$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.