1PDF::Builder::Basic::PDUFs:e:rPaCgoenst(r3i)buted Perl DPoDcFu:m:eBnutialtdieorn::Basic::PDF::Pages(3)
2
3
4
6 PDF::Builder::Basic::PDF::Pages - a PDF pages hierarchical element.
7 Inherits from PDF::Builder::Basic::PDF::Dict
8
10 A Pages object is the parent to other pages objects or to page objects
11 themselves.
12
14 PDF::Builder::Basic::PDF::Pages->new($pdf, $parent)
15 This creates a new Pages object in a PDF. Notice that the $parent
16 here is not the file context for the object, but the parent pages
17 object for these pages. If we are using this class to create a root
18 node, $parent should point to the file context, which is identified
19 by not having a Type of Pages. $pdf is the file object (or a
20 reference to an array of one file object [3.016 and later, or
21 multiple file objects earlier]) in which to create the new Pages
22 object.
23
24 $p->find_page($page_number)
25 Returns the given page, using the page count values in the pages
26 tree. Pages start at 0.
27
28 $p->add_page($page, $page_number)
29 Inserts the page before the given $page_number. $page_number can be
30 negative to count backwards from the END of the document. -1 is
31 after the last page. Likewise $page_number can be greater than the
32 number of pages currently in the document, to append.
33
34 This method only guarantees to provide a reasonable pages tree if
35 pages are appended or prepended to the document. Pages inserted in
36 the middle of the document may simply be inserted in the
37 appropriate leaf in the pages tree without adding any new branches
38 or leaves, leaving it unbalanced (slower performance, but still
39 usable).
40
41 @objects = $p->get_pages()
42 Returns a list of page objects in the document, in page order.
43
44 $p->find_prop($key)
45 Searches up through the inheritance tree to find a property (key).
46
47 $p->add_font($pdf, $font)
48 Creates or edits the resource dictionary at this level in the
49 hierarchy. If the font is already supported, even through the
50 hierarchy, then it is not added.
51
52 CAUTION: if this method was used in older releases, the code may
53 have swapped the order of $pdf and $font, requiring ad hoc swapping
54 of parameters in user code, contrary to the POD definition above.
55 Now the code matches the documentation.
56
57 $p->bbox($xmin,$ymin, $xmax,$ymax, $param)
58 $p->bbox($xmin,$ymin, $xmax,$ymax)
59 Specifies the bounding box for this and all child pages. If the
60 values are identical to those inherited, no change is made. $param
61 specifies the attribute name so that other 'bounding box'es can be
62 set with this method.
63
64 $p->proc_set(@entries)
65 Ensures that the current resource contains all the entries in the
66 proc_sets listed. If necessary, it creates a local resource
67 dictionary to achieve this.
68
69 $p->get_top()
70 Returns the top of the pages tree.
71
72
73
74perl v5.38.0 2023-07-21PDF::Builder::Basic::PDF::Pages(3)