setViewerPreferences

TCPDFは、PDFドキュメントを生成するためのPHPクラスです。TCPDFは2002年に初めて公開され開発が進められてきた無料のオープンソースソフトウェアです。現在公開されているPHPのPDFライブラリはいくつかありますが、その中でも機能面で一番優れていて実績もあります。

setViewerPreferences( $preferences )
‘Set the viewer preferences dictionary controlling the way the document is to be presented on the screen or in print. (see Section 8.1 of PDF reference, ”Viewer Preferences”).
HideToolbar boolean (Optional) A flag specifying whether to hide the viewer application’s tool bars when the document is active. Default value: false.
HideMenubar boolean (Optional) A flag specifying whether to hide the viewer application’s menu bar when the document is active. Default value: false.
HideWindowUI boolean (Optional) A flag specifying whether to hide user interface elements in the document’s window (such as scroll bars and navigation controls), leaving only the document’s contents displayed. Default value: false.
FitWindow boolean (Optional) A flag specifying whether to resize the document’s window to fit the size of the first displayed page. Default value: false.
CenterWindow boolean (Optional) A flag specifying whether to position the document’s window in the center of the screen. Default value: false.
DisplayDocTitle boolean (Optional; PDF 1.4) A flag specifying whether the window’s title bar should display the document title taken from the Title entry of the document information dictionary (see Section 10.2.1, ”Document Information Dictionary”). If false, the title bar should instead display the name of the PDF file containing the document. Default value: false.
NonFullScreenPageMode name (Optional) The document’s page mode, specifying how to display the document on exiting full-screen mode:
UseNone Neither document outline nor thumbnail images visible
UseOutlines Document outline visible
UseThumbs Thumbnail images visible
UseOC Optional content group panel visible
This entry is meaningful only if the value of the PageMode entry in the catalog dictionary (see Section 3.6.1, ”Document Catalog”) is FullScreen; it is ignored otherwise. Default value: UseNone.
ViewArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be displayed when viewing the document on the screen. Valid values are (see Section 10.10.1, ”Page Boundaries”).:
MediaBox
CropBox (default)
BleedBox
TrimBox
ArtBox
ViewClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when viewing the document on the screen. Valid values are (see Section 10.10.1, ”Page Boundaries”).:
MediaBox
CropBox (default)
BleedBox
TrimBox
ArtBox
PrintArea name (Optional; PDF 1.4) The name of the page boundary representing the area of a page to be rendered when printing the document. Valid values are (see Section 10.10.1, ”Page Boundaries”).:
MediaBox
CropBox (default)
BleedBox
TrimBox
ArtBox
PrintClip name (Optional; PDF 1.4) The name of the page boundary to which the contents of a page are to be clipped when printing the document. Valid values are (see Section 10.10.1, ”Page Boundaries”).:
MediaBox
CropBox (default)
BleedBox
TrimBox
ArtBox
PrintScaling name (Optional; PDF 1.6) The page scaling option to be selected when a print dialog is displayed for this document. Valid values are:
None, which indicates that the print dialog should reflect no page scaling
AppDefault (default), which indicates that applications should use the current print scaling
Duplex name (Optional; PDF 1.7) The paper handling option to use when printing the file from the print dialog. The following values are valid:
Simplex – Print single-sided
DuplexFlipShortEdge – Duplex and flip on the short edge of the sheet
DuplexFlipLongEdge – Duplex and flip on the long edge of the sheet
Default value: none
PickTrayByPDFSize boolean (Optional; PDF 1.7) A flag specifying whether the PDF page size is used to select the input paper tray. This setting influences only the preset values used to populate the print dialog presented by a PDF viewer application. If PickTrayByPDFSize is true, the check box in the print dialog associated with input paper tray is checked. Note: This setting has no effect on Mac OS systems, which do not provide the ability to pick the input tray by size.
PrintPageRange array (Optional; PDF 1.7) The page numbers used to initialize the print dialog box when the file is printed. The first page of the PDF file is denoted by 1. Each pair consists of the first and last pages in the sub-range. An odd number of integers causes this entry to be ignored. Negative numbers cause the entire array to be ignored. Default value: as defined by PDF viewer application
NumCopies integer (Optional; PDF 1.7) The number of copies to be printed when the print dialog is opened for this file. Supported values are the integers 2 through 5. Values outside this range are ignored. Default value: as defined by PDF viewer application, but typically 1′


タイトルとURLをコピーしました