Seen on a sign: “I hate it when I see and old person, and then realize we went to high school together.”
PDF::Builder::ViewerPreferences - How the PDF should be displayed or printed
This has been split out from preferences()
in PDF::Builder.
$self = $class->new($pdf)
Creates a new ViewerPreferences object from a PDF::Builder object.
%preferences = $self->get_preferences()
Returns a hash containing all of the viewer preferences that are defined in the PDF.
$value = $self->get_preference($name)
Returns the value of the specified viewer preference if present, or undef
if not.
$self->set_preferences(%values)
Sets one or more viewer preferences, as described in the preferences section below.
Viewer Preferences describe how the document should be presented on screen or in print. Not all PDF viewers will respect these preferences.
Boolean preferences default to false and take (or return) 0 or 1 as arguments.
Bounding Box preferences take (or return) one of media_box
, crop_box
, bleed_box
, trim_box
, or art_box
.
A flag specifying whether to hide the tool bars when the document is active.
A flag specifying whether to hide the menu bar when the document is active.
A flag specifying whether to hide the user interface elements in the document's window (such as scroll bars and navigation controls), leaving only the document's contents displayed.
A flag specifying whether to resize the document's window to fit the size of the first displayed page.
A flag specifying whether to position the document's window in the center of the screen.
A flag specifying whether the window's title bar should display the document title taken from the Title entry of the document information directory. If false, the title bar should instead display the name of the PDF file containing the document.
The document's page mode, specifying how to display the document on exiting full-screen mode. Options are the same as page_mode
in PDF::Builder, except that the attachments
and full_screen
options aren't supported.
The predominant reading order for text (left-to-right or right-to-left).
This entry has no direct effect on the document's contents or page numbering but may be used to determine the relative positioning of pages when displayed side-by-side or printed n-up.
The name of the page boundary representing the area of a page that shall be displayed when viewing the document on the screen.
The name of the page boundary to which the contents of a page shall be clipped when viewing the document on the screen.
The name of the page boundary representing the area of a page that shall be rendered when printing the document.
The name of the page boundary to which the contents of a page shall be clipped when printing the document.
The page scaling option that shall be selected when a print dialog is displayed for this document. none
represents no page scaling, and app_default
represents the reader's default print scaling.
The paper handling option that shall be used when printing the file from the print dialog. The duplex values represent whether the page should be flipped on its short edge or long edge, respectively.
A flag specifying whether the PDF page size shall be used to select the input paper tray. This setting influences only the preset values used to populate the print dialog presented by the reader.
The page numbers used to initialize the print dialog box when the file is printed. The array shall contain an even number of integers to be interpreted in pairs, with each pair specifying the first and last pages in a sub-range of pages to be printed. The first page of the PDF file shall be denoted by 1.
The number of copies that shall be printed when the print dialog is opened for this file.
Master Index
PDF::Builder -- Facilitates the creation and modification of PDF files
PDF::Builder::Annotation -- Add annotations to a PDF
PDF::Builder::Basic::PDF -- Various utilities and support routines
PDF::Builder::Content -- Methods for adding graphics and text to a PDF
PDF::Builder::Docs -- Additional documentation for Builder module
PDF::Builder::FontManager -- Managing the font library for PDF::Builder
PDF::Builder::Lite -- Lightweight PDF creation methods
PDF::Builder::Matrix -- Matrix operations library
PDF::Builder::NamedDestination -- Add named destinations (views) to a PDF
PDF::Builder::Outline -- Manage PDF outlines (a.k.a. bookmarks)
PDF::Builder::Outlines -- Further Outline handling
PDF::Builder::Page -- Methods to interact with individual pages
PDF::Builder::Resource -- Base class for PDF resources
PDF::Builder::UniWrap -- Support routines for finding line breakpoints with Unicode text
PDF::Builder::Util -- Utility package for often-used methods across the package
All content © copyright 2005 – 2025
by Catskill Technology Services, LLC.
All rights reserved.
Note that Third Party software (whether Open Source or proprietary) on this
site remains under the copyright and license of its owners.
Catskill Technology Services, LLC does not claim copyright over such software.
This page is https://www.catskilltech.com/Documentation/PDF/Builder/ViewerPreferences.html
Search Quotations database.
Last updated Sat, 09 Dec 2023 at 10:59 PM