blob: 8ac5db4f7213f7f55ff8d4ddddca9ed9118134e1 [file] [log] [blame]
[email protected]0e77a1d2012-03-20 03:10:201// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]c48bee22011-03-29 02:36:262// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "printing/print_job_constants.h"
6
7namespace printing {
8
[email protected]718af822011-08-12 22:11:339// True if this is the first preview request.
10const char kIsFirstRequest[] = "isFirstRequest";
11
[email protected]a8851352011-07-13 20:16:2512// Unique ID sent along every preview request.
13const char kPreviewRequestID[] = "requestID";
14
[email protected]ff906742011-08-23 05:04:4615// Unique ID to identify a print preview UI.
[email protected]116d0962012-08-24 23:22:2816const char kPreviewUIID[] = "previewUIID";
[email protected]ff906742011-08-23 05:04:4617
[email protected]833cac82014-03-22 04:58:4118// Capabilities option. Contains the capabilities in CDD format.
19const char kSettingCapabilities[] = "capabilities";
20
[email protected]b579afd2011-07-13 00:01:2721// Print using cloud print: true if selected, false if not.
22const char kSettingCloudPrintId[] = "cloudPrintID";
23
[email protected]f0be15bd2011-09-28 20:50:0424// Print using cloud print dialog: true if selected, false if not.
25const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
26
[email protected]c97e5e82011-04-05 18:50:2327// Print job setting 'collate'.
28const char kSettingCollate[] = "collate";
29
[email protected]c48bee22011-03-29 02:36:2630// Print out color: true for color, false for grayscale.
31const char kSettingColor[] = "color";
32
[email protected]0209b442012-07-18 00:38:0533// Default to color on or not.
34const char kSettingSetColorAsDefault[] = "setColorAsDefault";
35
[email protected]7a9b03e32011-08-23 19:56:1836// Key that specifies the height of the content area of the page.
37const char kSettingContentHeight[] = "contentHeight";
38
39// Key that specifies the width of the content area of the page.
40const char kSettingContentWidth[] = "contentWidth";
41
[email protected]c97e5e82011-04-05 18:50:2342// Number of copies.
43const char kSettingCopies[] = "copies";
44
[email protected]987e51f92011-05-04 21:10:1545// Device name: Unique printer identifier.
46const char kSettingDeviceName[] = "deviceName";
47
[email protected]826e63a162011-04-20 18:00:4548// Print job duplex mode.
49const char kSettingDuplexMode[] = "duplex";
50
[email protected]7a3439b2012-05-16 20:32:1451// Option to fit source page contents to printer paper size: true if
52// selected else false.
53const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
54
[email protected]576f99642011-08-31 05:19:4155// True, when a new set of draft preview data is required.
56const char kSettingGenerateDraftData[] = "generateDraftData";
57
[email protected]55b23a02011-08-17 23:09:3658// Option to print headers and Footers: true if selected, false if not.
59const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
60
[email protected]06bd18662011-10-07 06:12:4061// Interstice or gap between different header footer components. Hardcoded to
62// about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
63const float kSettingHeaderFooterInterstice = 14.2f;
[email protected]55b23a02011-08-17 23:09:3664
65// Key that specifies the date of the page that will be printed in the headers
66// and footers.
67const char kSettingHeaderFooterDate[] = "date";
68
69// Key that specifies the title of the page that will be printed in the headers
70// and footers.
71const char kSettingHeaderFooterTitle[] = "title";
72
73// Key that specifies the URL of the page that will be printed in the headers
74// and footers.
75const char kSettingHeaderFooterURL[] = "url";
76
[email protected]c48bee22011-03-29 02:36:2677// Page orientation: true for landscape, false for portrait.
78const char kSettingLandscape[] = "landscape";
79
[email protected]ae98e572014-05-14 23:52:5580// Key that specifies the requested media size.
81const char kSettingMediaSize[] = "mediaSize";
82
83// Key that specifies the requested media height in microns.
84const char kSettingMediaSizeHeightMicrons[] = "height_microns";
85
86// Key that specifies the requested media width in microns.
87const char kSettingMediaSizeWidthMicrons[] = "width_microns";
88
[email protected]72ddef92014-06-12 08:08:0689// Key that specifies the requested media platform specific vendor id.
90const char kSettingMediaSizeVendorId[] = "vendor_id";
91
[email protected]7a9b03e32011-08-23 19:56:1892// Key that specifies the bottom margin of the page.
93const char kSettingMarginBottom[] = "marginBottom";
94
95// Key that specifies the left margin of the page.
96const char kSettingMarginLeft[] = "marginLeft";
97
98// Key that specifies the right margin of the page.
99const char kSettingMarginRight[] = "marginRight";
100
101// Key that specifies the top margin of the page.
102const char kSettingMarginTop[] = "marginTop";
103
[email protected]6a7fdfd2011-10-13 09:05:42104// Key that specifies the dictionary of custom margins as set by the user.
105const char kSettingMarginsCustom[] = "marginsCustom";
106
107// Key that specifies the type of margins to use. Value is an int from the
108// MarginType enum.
109const char kSettingMarginsType[] = "marginsType";
[email protected]7a9b03e32011-08-23 19:56:18110
[email protected]82b6e0fc2013-02-12 01:28:20111// Number of pages to print.
112const char kSettingPreviewPageCount[] = "pageCount";
113
[email protected]06cb23882011-04-23 01:58:22114// A page range.
115const char kSettingPageRange[] = "pageRange";
116
117// The first page of a page range. (1-based)
118const char kSettingPageRangeFrom[] = "from";
119
120// The last page of a page range. (1-based)
121const char kSettingPageRangeTo[] = "to";
122
[email protected]3c0bcfa2013-11-21 22:47:00123// Page size of document to print.
124const char kSettingPageWidth[] = "pageWidth";
125const char kSettingPageHeight[] = "pageHeight";
126
[email protected]d75a0317e2011-10-17 20:20:40127const char kSettingPreviewModifiable[] = "previewModifiable";
128
[email protected]0e77a1d2012-03-20 03:10:20129// Keys that specifies the printable area details.
130const char kSettingPrintableAreaX[] = "printableAreaX";
131const char kSettingPrintableAreaY[] = "printableAreaY";
132const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
133const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
134
[email protected]f803c932011-03-30 16:40:12135// Printer name.
136const char kSettingPrinterName[] = "printerName";
137
[email protected]6df7b5a2014-03-29 17:39:47138// Printer description.
139const char kSettingPrinterDescription[] = "printerDescription";
140
141// Additional printer options.
142const char kSettingPrinterOptions[] = "printerOptions";
143
[email protected]b73bb80b2011-04-20 01:58:39144// Print to PDF option: true if selected, false if not.
145const char kSettingPrintToPDF[] = "printToPDF";
146
[email protected]014a62cb2013-11-09 17:23:25147// Print using Privet option: true if destination is a Privet printer, false if
148// not.
149const char kSettingPrintWithPrivet[] = "printWithPrivet";
150
151// Ticket option. Contains the ticket in CJT format.
152const char kSettingTicket[] = "ticket";
153
[email protected]19d1c2d2013-01-14 00:59:46154// Whether to print CSS backgrounds.
155const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
156
[email protected]edb363a82013-01-29 12:11:29157// Whether to print selection only.
158const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
159
[email protected]ff906742011-08-23 05:04:46160// Indices used to represent first preview page and complete preview document.
[email protected]fd0b503402011-07-26 09:01:33161const int FIRST_PAGE_INDEX = 0;
162const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
[email protected]fd0b503402011-07-26 09:01:33163
[email protected]e5324b52013-10-29 03:16:37164// Whether to show PDF in view provided by OS. Implemented for MacOS only.
[email protected]97c295752011-11-17 00:44:37165const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
[email protected]97c295752011-11-17 00:44:37166
[email protected]63313ae2011-10-13 00:40:39167#if defined (USE_CUPS)
168const char kBlack[] = "Black";
169const char kCMYK[] = "CMYK";
170const char kKCMY[] = "KCMY";
171const char kCMY_K[] = "CMY+K";
172const char kCMY[] = "CMY";
173const char kColor[] = "Color";
174const char kGray[] = "Gray";
175const char kGrayscale[] = "Grayscale";
176const char kGreyscale[] = "Greyscale";
177const char kMonochrome[] = "Monochrome";
178const char kNormal[] = "Normal";
179const char kNormalGray[] = "Normal.Gray";
180const char kRGB[] = "RGB";
181const char kRGBA[] = "RGBA";
182const char kRGB16[] = "RGB16";
183#endif
184
[email protected]c48bee22011-03-29 02:36:26185} // namespace printing