1Text::PDF::Pages(3)   User Contributed Perl Documentation  Text::PDF::Pages(3)
2
3
4

NAME

6       Text::PDF::Pages - a PDF pages hierarchical element. Inherits from
7       Text::PDF::Dict
8

DESCRIPTION

10       A Pages object is the parent to other pages objects or to page objects
11       themselves.
12

METHODS

14   Text::PDF::Pages->new($pdfs,$parent)
15       This creates a new Pages object. Notice that $parent here is not the
16       file context for the object but the parent pages object for this pages.
17       If we are using this class to create a root node, then $parent should
18       point to the file context, which is identified by not having a Type of
19       Pages.  $pdfs is the file object (or objects) in which to create the
20       new Pages object.
21
22   $p->out_obj($isnew)
23       Tells all the files that this thing is destined for that they should
24       output this object come time to output. If this object has no parent,
25       then it must be the root. So set as the root for the files in question
26       and tell it to be output too.  If $isnew is set, then call new_obj
27       rather than out_obj to create as a new object in the file.
28
29   $p->find_page($pnum)
30       Returns the given page, using the page count values in the pages tree.
31       Pages start at 0.
32
33   $p->add_page($page, $pnum)
34       Inserts the page before the given $pnum. $pnum can be -ve to count from
35       the END of the document. -1 is after the last page. Likewise $pnum can
36       be greater than the number of pages currently in the document, to
37       append.
38
39       This method only guarantees to provide a reasonable pages tree if pages
40       are appended or prepended to the document. Pages inserted in the middle
41       of the document may simply be inserted in the appropriate leaf in the
42       pages tree without adding any new branches or leaves. To tidy up such a
43       mess, it is best to call $p->rebuild_tree to rebuild the pages tree
44       into something efficient.
45
46   $root_pages = $p->rebuild_tree([@pglist])
47       Rebuilds the pages tree to make a nice balanced tree that conforms to
48       Adobe recommendations. If passed a pglist then the tree is built for
49       that list of pages. No check is made of whether the pglist contains
50       pages.
51
52       Returns the top of the tree for insertion in the root object.
53
54   @pglist = $p->get_pages
55       Returns a list of page objects in the document in page order
56
57   $p->find_prop($key)
58       Searches up through the inheritance tree to find a property.
59
60   $p->add_font($pdf, $font)
61       Creates or edits the resource dictionary at this level in the
62       hierarchy. If the font is already supported even through the hierarchy,
63       then it is not added.
64
65   $p->bbox($xmin, $ymin, $xmax, $ymax, [$param])
66       Specifies the bounding box for this and all child pages. If the values
67       are identical to those inherited then no change is made. $param
68       specifies the attribute name so that other 'bounding box'es can be set
69       with this method.
70
71   $p->proc_set(@entries)
72       Ensures that the current resource contains all the entries in the
73       proc_sets listed. If necessary it creates a local resource dictionary
74       to achieve this.
75
76   $p->get_top
77       Returns the top of the pages tree
78
79
80
81perl v5.34.0                      2021-07-23               Text::PDF::Pages(3)
Impressum