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