1PDF::API2::ViewerPreferUesnecresC(o3n)tributed Perl DocuPmDeFn:t:aAtPiIo2n::ViewerPreferences(3)
2
3
4
6 PDF::API2::ViewerPreferences - How the PDF should be displayed or
7 printed
8
10 $self = $class->new($pdf)
11 Creates a new ViewerPreferences object from a PDF::API2 object.
12
13 %preferences = $self->get_preferences()
14 Returns a hash containing all of the viewer preferences that are
15 defined in the PDF.
16
17 $value = $self->get_preference($name)
18 Returns the value of the specified viewer preference if present, or
19 "undef" if not.
20
21 $self->set_preferences(%values)
22 Sets one or more viewer preferences, as described in the
23 preferences section below.
24
26 Viewer Preferences describe how the document should be presented on
27 screen or in print. Not all PDF viewers will respect these
28 preferences.
29
30 Boolean preferences default to false and take (or return) 0 or 1 as
31 arguments.
32
33 Bounding Box preferences take (or return) one of "media_box",
34 "crop_box", "bleed_box", "trim_box", or "art_box".
35
36 hide_toolbar (boolean)
37 A flag specifying whether to hide the tool bars when the document
38 is active.
39
40 hide_menubar (boolean)
41 A flag specifying whether to hide the menu bar when the document is
42 active.
43
44 hide_window_ui (boolean)
45 A flag specifying whether to hide the user interface elements in
46 the document's window (such as scroll bars and navigation
47 controls), leaving only the document's contents displayed.
48
49 fit_window (boolean)
50 A flag specifying whether to resize the document's window to fit
51 the size of the first displayed page.
52
53 center_window (boolean)
54 A flag specifying whether to position the document's window in the
55 center of the screen.
56
57 display_doc_title (boolean)
58 A flag specifying whether the window's title bar should display the
59 document title taken from the Title entry of the document
60 information directory. If false, the title bar should instead
61 display the name of the PDF file containing the document.
62
63 non_full_screen_page_mode (name)
64 The document's page mode, specifying how to display the document on
65 exiting full-screen mode. Options are the same as "page_mode" in
66 PDF::API2.
67
68 direction ('l2r' or 'r2l')
69 The predominant reading order for text (left-to-right or right-to-
70 left).
71
72 This entry has no direct effect on the document's contents or page
73 numbering but may be used to determine the relative positioning of
74 pages when displayed side-by-side or printed n-up.
75
76 view_area (bounding box)
77 The name of the page boundary representing the area of a page that
78 shall be displayed when viewing the document on the screen.
79
80 view_clip (bounding box)
81 The name of the page boundary to which the contents of a page shall
82 be clipped when viewing the document on the screen.
83
84 print_area (bounding box)
85 The name of the page boundary representing the area of a page that
86 shall be rendered when printing the document.
87
88 print_clip (bounding box)
89 The name of the page boundary to which the contents of a page shall
90 be clipped when printing the document.
91
92 print_scaling ('none' or 'app_default')
93 The page scaling option that shall be selected when a print dialog
94 is displayed for this document. "none" represents no page scaling,
95 and "app_default" represents the reader's default print scaling.
96
97 duplex ('simplex', 'duplex_short', or 'duplex_long')
98 The paper handling option that shall be used when printing the file
99 from the print dialog. The duplex values represent whether the
100 page should be flipped on its short edge or long edge,
101 respectively.
102
103 pick_tray_by_pdf_size (boolean)
104 A flag specifying whether the PDF page size shall be used to select
105 the input paper tray. This setting influences only the preset
106 values used to populate the print dialog presented by the reader.
107
108 print_page_rage (an array of integer pairs)
109 The page numbers used to initialize the print dialog box when the
110 file is printed. The array shall contain an even number of
111 integers to be interpreted in pairs, with each pair specifying the
112 first and last pages in a sub-range of pages to be printed. The
113 first page of the PDF file shall be denoted by 1.
114
115 num_copies (integer)
116 The number of copies that shall be printed when the print dialog is
117 opened for this file.
118
119
120
121perl v5.34.0 2022-01-21 PDF::API2::ViewerPreferences(3)