blob: ffaa88513d17f9699f50282b267940c4e2977234 [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
Vitaly Bukabd7c9812014-08-26 08:57:5415// Unique ID of Print Preview initiator host.
16const char kPreviewInitiatorHostId[] = "previewInitiatorHostId";
17
18// Routing ID of Print Preview initiator.
19const char kPreviewInitiatorRoutingId[] = "previewInitiatorRoutingId";
20
[email protected]ff906742011-08-23 05:04:4621// Unique ID to identify a print preview UI.
[email protected]116d0962012-08-24 23:22:2822const char kPreviewUIID[] = "previewUIID";
[email protected]ff906742011-08-23 05:04:4623
[email protected]833cac82014-03-22 04:58:4124// Capabilities option. Contains the capabilities in CDD format.
25const char kSettingCapabilities[] = "capabilities";
26
[email protected]b579afd2011-07-13 00:01:2727// Print using cloud print: true if selected, false if not.
28const char kSettingCloudPrintId[] = "cloudPrintID";
29
[email protected]f0be15bd2011-09-28 20:50:0430// Print using cloud print dialog: true if selected, false if not.
31const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
32
[email protected]c97e5e82011-04-05 18:50:2333// Print job setting 'collate'.
34const char kSettingCollate[] = "collate";
35
[email protected]c48bee22011-03-29 02:36:2636// Print out color: true for color, false for grayscale.
37const char kSettingColor[] = "color";
38
[email protected]0209b442012-07-18 00:38:0539// Default to color on or not.
40const char kSettingSetColorAsDefault[] = "setColorAsDefault";
41
[email protected]7a9b03e32011-08-23 19:56:1842// Key that specifies the height of the content area of the page.
43const char kSettingContentHeight[] = "contentHeight";
44
45// Key that specifies the width of the content area of the page.
46const char kSettingContentWidth[] = "contentWidth";
47
[email protected]c97e5e82011-04-05 18:50:2348// Number of copies.
49const char kSettingCopies[] = "copies";
50
[email protected]987e51f92011-05-04 21:10:1551// Device name: Unique printer identifier.
52const char kSettingDeviceName[] = "deviceName";
53
n.bansal2604a972014-12-09 12:26:4754// Option to disable scaling. True if scaling is disabled else false.
55const char kSettingDisableScaling[] = "disableScaling";
56
[email protected]826e63a162011-04-20 18:00:4557// Print job duplex mode.
58const char kSettingDuplexMode[] = "duplex";
59
[email protected]7a3439b2012-05-16 20:32:1460// Option to fit source page contents to printer paper size: true if
61// selected else false.
62const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
63
[email protected]576f99642011-08-31 05:19:4164// True, when a new set of draft preview data is required.
65const char kSettingGenerateDraftData[] = "generateDraftData";
66
[email protected]55b23a02011-08-17 23:09:3667// Option to print headers and Footers: true if selected, false if not.
68const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
69
[email protected]06bd18662011-10-07 06:12:4070// Interstice or gap between different header footer components. Hardcoded to
71// about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
72const float kSettingHeaderFooterInterstice = 14.2f;
[email protected]55b23a02011-08-17 23:09:3673
74// Key that specifies the date of the page that will be printed in the headers
75// and footers.
76const char kSettingHeaderFooterDate[] = "date";
77
78// Key that specifies the title of the page that will be printed in the headers
79// and footers.
80const char kSettingHeaderFooterTitle[] = "title";
81
82// Key that specifies the URL of the page that will be printed in the headers
83// and footers.
84const char kSettingHeaderFooterURL[] = "url";
85
[email protected]c48bee22011-03-29 02:36:2686// Page orientation: true for landscape, false for portrait.
87const char kSettingLandscape[] = "landscape";
88
[email protected]ae98e572014-05-14 23:52:5589// Key that specifies the requested media size.
90const char kSettingMediaSize[] = "mediaSize";
91
92// Key that specifies the requested media height in microns.
93const char kSettingMediaSizeHeightMicrons[] = "height_microns";
94
95// Key that specifies the requested media width in microns.
96const char kSettingMediaSizeWidthMicrons[] = "width_microns";
97
[email protected]72ddef92014-06-12 08:08:0698// Key that specifies the requested media platform specific vendor id.
99const char kSettingMediaSizeVendorId[] = "vendor_id";
100
alekseysd6a8369b2014-09-24 23:01:31101// Key that specifies whether the requested media is a default one.
102const char kSettingMediaSizeIsDefault[] = "is_default";
103
[email protected]7a9b03e32011-08-23 19:56:18104// Key that specifies the bottom margin of the page.
105const char kSettingMarginBottom[] = "marginBottom";
106
107// Key that specifies the left margin of the page.
108const char kSettingMarginLeft[] = "marginLeft";
109
110// Key that specifies the right margin of the page.
111const char kSettingMarginRight[] = "marginRight";
112
113// Key that specifies the top margin of the page.
114const char kSettingMarginTop[] = "marginTop";
115
[email protected]6a7fdfd2011-10-13 09:05:42116// Key that specifies the dictionary of custom margins as set by the user.
117const char kSettingMarginsCustom[] = "marginsCustom";
118
119// Key that specifies the type of margins to use. Value is an int from the
120// MarginType enum.
121const char kSettingMarginsType[] = "marginsType";
[email protected]7a9b03e32011-08-23 19:56:18122
[email protected]82b6e0fc2013-02-12 01:28:20123// Number of pages to print.
124const char kSettingPreviewPageCount[] = "pageCount";
125
[email protected]06cb23882011-04-23 01:58:22126// A page range.
127const char kSettingPageRange[] = "pageRange";
128
129// The first page of a page range. (1-based)
130const char kSettingPageRangeFrom[] = "from";
131
132// The last page of a page range. (1-based)
133const char kSettingPageRangeTo[] = "to";
134
[email protected]3c0bcfa2013-11-21 22:47:00135// Page size of document to print.
136const char kSettingPageWidth[] = "pageWidth";
137const char kSettingPageHeight[] = "pageHeight";
138
[email protected]d75a0317e2011-10-17 20:20:40139const char kSettingPreviewModifiable[] = "previewModifiable";
140
[email protected]0e77a1d2012-03-20 03:10:20141// Keys that specifies the printable area details.
142const char kSettingPrintableAreaX[] = "printableAreaX";
143const char kSettingPrintableAreaY[] = "printableAreaY";
144const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
145const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
146
[email protected]f803c932011-03-30 16:40:12147// Printer name.
148const char kSettingPrinterName[] = "printerName";
149
[email protected]6df7b5a2014-03-29 17:39:47150// Printer description.
151const char kSettingPrinterDescription[] = "printerDescription";
152
153// Additional printer options.
154const char kSettingPrinterOptions[] = "printerOptions";
155
[email protected]b73bb80b2011-04-20 01:58:39156// Print to PDF option: true if selected, false if not.
157const char kSettingPrintToPDF[] = "printToPDF";
158
[email protected]014a62cb2013-11-09 17:23:25159// Print using Privet option: true if destination is a Privet printer, false if
160// not.
161const char kSettingPrintWithPrivet[] = "printWithPrivet";
162
tbarzic90c6d732015-02-12 03:40:58163// Print using extension option: true if destination is an extension printer,
164// false if not.
165const char kSettingPrintWithExtension[] = "printWithExtension";
166
[email protected]014a62cb2013-11-09 17:23:25167// Ticket option. Contains the ticket in CJT format.
168const char kSettingTicket[] = "ticket";
169
[email protected]19d1c2d2013-01-14 00:59:46170// Whether to print CSS backgrounds.
171const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
172
[email protected]edb363a82013-01-29 12:11:29173// Whether to print selection only.
174const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
175
vitalybuka92ab8ce2014-08-26 23:41:45176// Whether to print selection only.
177const char kSettingShowSystemDialog[] = "showSystemDialog";
178
[email protected]ff906742011-08-23 05:04:46179// Indices used to represent first preview page and complete preview document.
[email protected]fd0b503402011-07-26 09:01:33180const int FIRST_PAGE_INDEX = 0;
181const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
[email protected]fd0b503402011-07-26 09:01:33182
[email protected]e5324b52013-10-29 03:16:37183// Whether to show PDF in view provided by OS. Implemented for MacOS only.
[email protected]97c295752011-11-17 00:44:37184const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
[email protected]97c295752011-11-17 00:44:37185
[email protected]63313ae2011-10-13 00:40:39186#if defined (USE_CUPS)
187const char kBlack[] = "Black";
188const char kCMYK[] = "CMYK";
189const char kKCMY[] = "KCMY";
190const char kCMY_K[] = "CMY+K";
191const char kCMY[] = "CMY";
192const char kColor[] = "Color";
193const char kGray[] = "Gray";
194const char kGrayscale[] = "Grayscale";
195const char kGreyscale[] = "Greyscale";
196const char kMonochrome[] = "Monochrome";
197const char kNormal[] = "Normal";
198const char kNormalGray[] = "Normal.Gray";
199const char kRGB[] = "RGB";
200const char kRGBA[] = "RGBA";
201const char kRGB16[] = "RGB16";
202#endif
203
[email protected]c48bee22011-03-29 02:36:26204} // namespace printing