1PDF::API2::Page(3)    User Contributed Perl Documentation   PDF::API2::Page(3)
2
3
4

NAME

6       PDF::API2::Page - Methods to interact with individual pages
7

METHODS

9       $page = PDF::API2::Page->new $pdf, $parent, $index
10           Returns a page object (called from $pdf->page).
11
12       $page = PDF::API2::Page->coerce $pdf, $pdfpage
13           Returns a page object converted from $pdfpage (called from
14           $pdf->openpage).
15
16       $page->update
17           Marks a page to be updated (by $pdf->update).
18
19       $page->mediabox $w, $h
20       $page->mediabox $llx, $lly, $urx, $ury
21       $page->mediabox $alias
22           Sets the mediabox.  This method supports the following aliases:
23           '4A0', '2A0', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', '4B0',
24           '2B0', 'B0', 'B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'LETTER',
25           'BROADSHEET', 'LEDGER', 'TABLOID', 'LEGAL', 'EXECUTIVE', and
26           '36X36'.
27
28       ($llx, $lly, $urx, $ury) = $page->get_mediabox
29           Gets the mediabox based on best estimates or the default.
30
31       $page->cropbox $w, $h
32       $page->cropbox $llx, $lly, $urx, $ury
33       $page->cropbox $alias
34           Sets the cropbox.  This method supports the same aliases as
35           mediabox.
36
37       ($llx, $lly, $urx, $ury) = $page->get_cropbox
38           Gets the cropbox based on best estimates or the default.
39
40       $page->bleedbox $w, $h
41       $page->bleedbox $llx, $lly, $urx, $ury
42       $page->bleedbox $alias
43           Sets the bleedbox.  This method supports the same aliases as
44           mediabox.
45
46       ($llx, $lly, $urx, $ury) = $page->get_bleedbox
47           Gets the bleedbox based on best estimates or the default.
48
49       $page->trimbox $w, $h
50       $page->trimbox $llx, $lly, $urx, $ury
51           Sets the trimbox.  This method supports the same aliases as
52           mediabox.
53
54       ($llx, $lly, $urx, $ury) = $page->get_trimbox
55           Gets the trimbox based on best estimates or the default.
56
57       $page->artbox $w, $h
58       $page->artbox $llx, $lly, $urx, $ury
59       $page->artbox $alias
60           Sets the artbox.  This method supports the same aliases as
61           mediabox.
62
63       ($llx, $lly, $urx, $ury) = $page->get_artbox
64           Gets the artbox based on best estimates or the default.
65
66       $page->rotate $deg
67           Rotates the page by the given degrees, which must be a multiple of
68           90.
69
70           (This allows you to auto-rotate to landscape without changing the
71           mediabox!)
72
73       $gfx = $page->gfx $prepend
74           Returns a graphics content object. If $prepend is true the content
75           will be prepended to the page description.
76
77       $txt = $page->text $prepend
78           Returns a text content object. If $prepend is true the content will
79           be prepended to the page description.
80
81       $ant = $page->annotation
82           Returns a new annotation object.
83
84       $page->resource $type, $key, $obj
85           Adds a resource to the page-inheritance tree.
86
87           Example:
88
89               $co->resource('Font',$fontkey,$fontobj);
90               $co->resource('XObject',$imagekey,$imageobj);
91               $co->resource('Shading',$shadekey,$shadeobj);
92               $co->resource('ColorSpace',$spacekey,$speceobj);
93
94           Note: You only have to add the required resources, if they are NOT
95           handled by the *font*, *image*, *shade* or *space* methods.
96
97
98
99perl v5.28.0                      2017-07-07                PDF::API2::Page(3)
Impressum