1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "printing/print_job_constants.h"
9 // True if this is the first preview request.
10 const char kIsFirstRequest
[] = "isFirstRequest";
12 // Unique ID sent along every preview request.
13 const char kPreviewRequestID
[] = "requestID";
15 // Unique ID to identify a print preview UI.
16 const char kPreviewUIID
[] = "previewUIID";
18 // Capabilities option. Contains the capabilities in CDD format.
19 const char kSettingCapabilities
[] = "capabilities";
21 // Print using cloud print: true if selected, false if not.
22 const char kSettingCloudPrintId
[] = "cloudPrintID";
24 // Print using cloud print dialog: true if selected, false if not.
25 const char kSettingCloudPrintDialog
[] = "printWithCloudPrint";
27 // Print job setting 'collate'.
28 const char kSettingCollate
[] = "collate";
30 // Print out color: true for color, false for grayscale.
31 const char kSettingColor
[] = "color";
33 // Default to color on or not.
34 const char kSettingSetColorAsDefault
[] = "setColorAsDefault";
36 // Key that specifies the height of the content area of the page.
37 const char kSettingContentHeight
[] = "contentHeight";
39 // Key that specifies the width of the content area of the page.
40 const char kSettingContentWidth
[] = "contentWidth";
43 const char kSettingCopies
[] = "copies";
45 // Device name: Unique printer identifier.
46 const char kSettingDeviceName
[] = "deviceName";
48 // Print job duplex mode.
49 const char kSettingDuplexMode
[] = "duplex";
51 // Option to fit source page contents to printer paper size: true if
52 // selected else false.
53 const char kSettingFitToPageEnabled
[] = "fitToPageEnabled";
55 // True, when a new set of draft preview data is required.
56 const char kSettingGenerateDraftData
[] = "generateDraftData";
58 // Option to print headers and Footers: true if selected, false if not.
59 const char kSettingHeaderFooterEnabled
[] = "headerFooterEnabled";
61 // Interstice or gap between different header footer components. Hardcoded to
62 // about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
63 const float kSettingHeaderFooterInterstice
= 14.2f
;
65 // Key that specifies the date of the page that will be printed in the headers
67 const char kSettingHeaderFooterDate
[] = "date";
69 // Key that specifies the title of the page that will be printed in the headers
71 const char kSettingHeaderFooterTitle
[] = "title";
73 // Key that specifies the URL of the page that will be printed in the headers
75 const char kSettingHeaderFooterURL
[] = "url";
77 // Page orientation: true for landscape, false for portrait.
78 const char kSettingLandscape
[] = "landscape";
80 // Key that specifies the bottom margin of the page.
81 const char kSettingMarginBottom
[] = "marginBottom";
83 // Key that specifies the left margin of the page.
84 const char kSettingMarginLeft
[] = "marginLeft";
86 // Key that specifies the right margin of the page.
87 const char kSettingMarginRight
[] = "marginRight";
89 // Key that specifies the top margin of the page.
90 const char kSettingMarginTop
[] = "marginTop";
92 // Key that specifies the dictionary of custom margins as set by the user.
93 const char kSettingMarginsCustom
[] = "marginsCustom";
95 // Key that specifies the type of margins to use. Value is an int from the
97 const char kSettingMarginsType
[] = "marginsType";
99 // Number of pages to print.
100 const char kSettingPreviewPageCount
[] = "pageCount";
103 const char kSettingPageRange
[] = "pageRange";
105 // The first page of a page range. (1-based)
106 const char kSettingPageRangeFrom
[] = "from";
108 // The last page of a page range. (1-based)
109 const char kSettingPageRangeTo
[] = "to";
111 // Page size of document to print.
112 const char kSettingPageWidth
[] = "pageWidth";
113 const char kSettingPageHeight
[] = "pageHeight";
115 const char kSettingPreviewModifiable
[] = "previewModifiable";
117 // Keys that specifies the printable area details.
118 const char kSettingPrintableAreaX
[] = "printableAreaX";
119 const char kSettingPrintableAreaY
[] = "printableAreaY";
120 const char kSettingPrintableAreaWidth
[] = "printableAreaWidth";
121 const char kSettingPrintableAreaHeight
[] = "printableAreaHeight";
124 const char kSettingPrinterName
[] = "printerName";
126 // Printer description.
127 const char kSettingPrinterDescription
[] = "printerDescription";
129 // Additional printer options.
130 const char kSettingPrinterOptions
[] = "printerOptions";
132 // Print to PDF option: true if selected, false if not.
133 const char kSettingPrintToPDF
[] = "printToPDF";
135 // Print using Privet option: true if destination is a Privet printer, false if
137 const char kSettingPrintWithPrivet
[] = "printWithPrivet";
139 // Ticket option. Contains the ticket in CJT format.
140 const char kSettingTicket
[] = "ticket";
142 // Whether to print CSS backgrounds.
143 const char kSettingShouldPrintBackgrounds
[] = "shouldPrintBackgrounds";
145 // Whether to print selection only.
146 const char kSettingShouldPrintSelectionOnly
[] = "shouldPrintSelectionOnly";
148 // Indices used to represent first preview page and complete preview document.
149 const int FIRST_PAGE_INDEX
= 0;
150 const int COMPLETE_PREVIEW_DOCUMENT_INDEX
= -1;
152 // Whether to show PDF in view provided by OS. Implemented for MacOS only.
153 const char kSettingOpenPDFInPreview
[] = "OpenPDFInPreview";
155 #if defined (USE_CUPS)
156 const char kBlack
[] = "Black";
157 const char kCMYK
[] = "CMYK";
158 const char kKCMY
[] = "KCMY";
159 const char kCMY_K
[] = "CMY+K";
160 const char kCMY
[] = "CMY";
161 const char kColor
[] = "Color";
162 const char kGray
[] = "Gray";
163 const char kGrayscale
[] = "Grayscale";
164 const char kGreyscale
[] = "Greyscale";
165 const char kMonochrome
[] = "Monochrome";
166 const char kNormal
[] = "Normal";
167 const char kNormalGray
[] = "Normal.Gray";
168 const char kRGB
[] = "RGB";
169 const char kRGBA
[] = "RGBA";
170 const char kRGB16
[] = "RGB16";
173 } // namespace printing