1PDF::API2::Outline(3) User Contributed Perl DocumentationPDF::API2::Outline(3)
2
3
4

NAME

6       PDF::API2::Outline - Manage PDF outlines (a.k.a. bookmarks)
7

METHODS

9       $outline = PDF::API2::Outline->new($api, $parent, $prev)
10           Returns a new outline object (called from $outlines->outline()).
11
12       $outline->title($text)
13           Set the title of the outline.
14
15       $outline->closed()
16           Set the status of the outline to closed (i.e. collapsed).
17
18       $outline->open()
19           Set the status of the outline to open (i.e. expanded).
20
21       $child_outline = $parent_outline->outline()
22           Returns a nested outline.
23
24       $outline->dest($page_object, %position)
25           Sets the destination page and optional position of the outline.
26
27           %position can be any of the following:
28
29           -fit => 1
30               Display the page designated by page, with its contents
31               magnified just enough to fit the entire page within the window
32               both horizontally and vertically. If the required horizontal
33               and vertical magnification factors are different, use the
34               smaller of the two, centering the page within the window in the
35               other dimension.
36
37           -fith => $top
38               Display the page designated by page, with the vertical
39               coordinate $top positioned at the top edge of the window and
40               the contents of the page magnified just enough to fit the
41               entire width of the page within the window.
42
43           -fitv => $left
44               Display the page designated by page, with the horizontal
45               coordinate $left positioned at the left edge of the window and
46               the contents of the page magnified just enough to fit the
47               entire height of the page within the window.
48
49           -fitr => [$left, $bottom, $right, $top]
50               Display the page designated by page, with its contents
51               magnified just enough to fit the rectangle specified by the
52               coordinates $left, $bottom, $right, and $top entirely within
53               the window both horizontally and vertically. If the required
54               horizontal and vertical magnification factors are different,
55               use the smaller of the two, centering the rectangle within the
56               window in the other dimension.
57
58           -fitb => 1
59               Display the page designated by page, with its contents
60               magnified just enough to fit its bounding box entirely within
61               the window both horizontally and vertically. If the required
62               horizontal and vertical magnification factors are different,
63               use the smaller of the two, centering the bounding box within
64               the window in the other dimension.
65
66           -fitbh => $top
67               Display the page designated by page, with the vertical
68               coordinate $top positioned at the top edge of the window and
69               the contents of the page magnified just enough to fit the
70               entire width of its bounding box within the window.
71
72           -fitbv => $left
73               Display the page designated by page, with the horizontal
74               coordinate $left positioned at the left edge of the window and
75               the contents of the page magnified just enough to fit the
76               entire height of its bounding box within the window.
77
78           -xyz => [$left, $top, $zoom]
79               Display the page designated by page, with the coordinates
80               ($left, $top) positioned at the top-left corner of the window
81               and the contents of the page magnified by the factor $zoom. A
82               zero (0) value for any of the parameters $left, $top, or $zoom
83               specifies that the current value of that parameter is to be
84               retained unchanged.
85
86       $outline->dest($name)
87           Connect the outline to a "Named Destination" defined elsewhere.
88
89       $outline->url($url)
90           Launch $url when the outline item is activated.
91
92       $outline->file($filename)
93           Launch an application or file when the outline item is activated
94
95       $outline->pdf_file($filename, $page_number, %position)
96           Open a PDF file to a particular page number (first page is zero,
97           which is also the default).  The page can optionally be positioned
98           at a particular place in the viewport (see dest for details).
99
100
101
102perl v5.30.1                      2020-02-06             PDF::API2::Outline(3)
Impressum