blob: 25b5b499bdf947887983f028863157fa5970898d [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]b579afd2011-07-13 00:01:2718// Print using cloud print: true if selected, false if not.
19const char kSettingCloudPrintId[] = "cloudPrintID";
20
[email protected]f0be15bd2011-09-28 20:50:0421// Print using cloud print dialog: true if selected, false if not.
22const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
23
[email protected]c97e5e82011-04-05 18:50:2324// Print job setting 'collate'.
25const char kSettingCollate[] = "collate";
26
[email protected]c48bee22011-03-29 02:36:2627// Print out color: true for color, false for grayscale.
28const char kSettingColor[] = "color";
29
[email protected]0209b442012-07-18 00:38:0530// Default to color on or not.
31const char kSettingSetColorAsDefault[] = "setColorAsDefault";
32
[email protected]7a9b03e32011-08-23 19:56:1833// Key that specifies the height of the content area of the page.
34const char kSettingContentHeight[] = "contentHeight";
35
36// Key that specifies the width of the content area of the page.
37const char kSettingContentWidth[] = "contentWidth";
38
[email protected]c97e5e82011-04-05 18:50:2339// Number of copies.
40const char kSettingCopies[] = "copies";
41
[email protected]987e51f92011-05-04 21:10:1542// Device name: Unique printer identifier.
43const char kSettingDeviceName[] = "deviceName";
44
[email protected]826e63a162011-04-20 18:00:4545// Print job duplex mode.
46const char kSettingDuplexMode[] = "duplex";
47
[email protected]7a3439b2012-05-16 20:32:1448// Option to fit source page contents to printer paper size: true if
49// selected else false.
50const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
51
[email protected]576f99642011-08-31 05:19:4152// True, when a new set of draft preview data is required.
53const char kSettingGenerateDraftData[] = "generateDraftData";
54
[email protected]55b23a02011-08-17 23:09:3655// Option to print headers and Footers: true if selected, false if not.
56const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
57
[email protected]06bd18662011-10-07 06:12:4058// Interstice or gap between different header footer components. Hardcoded to
59// about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
60const float kSettingHeaderFooterInterstice = 14.2f;
[email protected]55b23a02011-08-17 23:09:3661
62// Key that specifies the date of the page that will be printed in the headers
63// and footers.
64const char kSettingHeaderFooterDate[] = "date";
65
66// Key that specifies the title of the page that will be printed in the headers
67// and footers.
68const char kSettingHeaderFooterTitle[] = "title";
69
70// Key that specifies the URL of the page that will be printed in the headers
71// and footers.
72const char kSettingHeaderFooterURL[] = "url";
73
[email protected]c48bee22011-03-29 02:36:2674// Page orientation: true for landscape, false for portrait.
75const char kSettingLandscape[] = "landscape";
76
[email protected]7a9b03e32011-08-23 19:56:1877// Key that specifies the bottom margin of the page.
78const char kSettingMarginBottom[] = "marginBottom";
79
80// Key that specifies the left margin of the page.
81const char kSettingMarginLeft[] = "marginLeft";
82
83// Key that specifies the right margin of the page.
84const char kSettingMarginRight[] = "marginRight";
85
86// Key that specifies the top margin of the page.
87const char kSettingMarginTop[] = "marginTop";
88
[email protected]6a7fdfd2011-10-13 09:05:4289// Key that specifies the dictionary of custom margins as set by the user.
90const char kSettingMarginsCustom[] = "marginsCustom";
91
92// Key that specifies the type of margins to use. Value is an int from the
93// MarginType enum.
94const char kSettingMarginsType[] = "marginsType";
[email protected]7a9b03e32011-08-23 19:56:1895
[email protected]82b6e0fc2013-02-12 01:28:2096// Number of pages to print.
97const char kSettingPreviewPageCount[] = "pageCount";
98
[email protected]06cb23882011-04-23 01:58:2299// A page range.
100const char kSettingPageRange[] = "pageRange";
101
102// The first page of a page range. (1-based)
103const char kSettingPageRangeFrom[] = "from";
104
105// The last page of a page range. (1-based)
106const char kSettingPageRangeTo[] = "to";
107
[email protected]d75a0317e2011-10-17 20:20:40108const char kSettingPreviewModifiable[] = "previewModifiable";
109
[email protected]0e77a1d2012-03-20 03:10:20110// Keys that specifies the printable area details.
111const char kSettingPrintableAreaX[] = "printableAreaX";
112const char kSettingPrintableAreaY[] = "printableAreaY";
113const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
114const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
115
[email protected]f803c932011-03-30 16:40:12116// Printer name.
117const char kSettingPrinterName[] = "printerName";
118
[email protected]b73bb80b2011-04-20 01:58:39119// Print to PDF option: true if selected, false if not.
120const char kSettingPrintToPDF[] = "printToPDF";
121
[email protected]014a62cb2013-11-09 17:23:25122// Print using Privet option: true if destination is a Privet printer, false if
123// not.
124const char kSettingPrintWithPrivet[] = "printWithPrivet";
125
126// Ticket option. Contains the ticket in CJT format.
127const char kSettingTicket[] = "ticket";
128
[email protected]19d1c2d2013-01-14 00:59:46129// Whether to print CSS backgrounds.
130const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
131
[email protected]edb363a82013-01-29 12:11:29132// Whether to print selection only.
133const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
134
[email protected]ff906742011-08-23 05:04:46135// Indices used to represent first preview page and complete preview document.
[email protected]fd0b503402011-07-26 09:01:33136const int FIRST_PAGE_INDEX = 0;
137const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
[email protected]fd0b503402011-07-26 09:01:33138
[email protected]e5324b52013-10-29 03:16:37139// Whether to show PDF in view provided by OS. Implemented for MacOS only.
[email protected]97c295752011-11-17 00:44:37140const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
[email protected]97c295752011-11-17 00:44:37141
[email protected]63313ae2011-10-13 00:40:39142#if defined (USE_CUPS)
143const char kBlack[] = "Black";
144const char kCMYK[] = "CMYK";
145const char kKCMY[] = "KCMY";
146const char kCMY_K[] = "CMY+K";
147const char kCMY[] = "CMY";
148const char kColor[] = "Color";
149const char kGray[] = "Gray";
150const char kGrayscale[] = "Grayscale";
151const char kGreyscale[] = "Greyscale";
152const char kMonochrome[] = "Monochrome";
153const char kNormal[] = "Normal";
154const char kNormalGray[] = "Normal.Gray";
155const char kRGB[] = "RGB";
156const char kRGBA[] = "RGBA";
157const char kRGB16[] = "RGB16";
158#endif
159
[email protected]c48bee22011-03-29 02:36:26160} // namespace printing