blob: 9a28ddb132570277b05abcb15d92b5f4cd67ffd0 [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]3c0bcfa2013-11-21 22:47:00108// Page size of document to print.
109const char kSettingPageWidth[] = "pageWidth";
110const char kSettingPageHeight[] = "pageHeight";
111
[email protected]d75a0317e2011-10-17 20:20:40112const char kSettingPreviewModifiable[] = "previewModifiable";
113
[email protected]0e77a1d2012-03-20 03:10:20114// Keys that specifies the printable area details.
115const char kSettingPrintableAreaX[] = "printableAreaX";
116const char kSettingPrintableAreaY[] = "printableAreaY";
117const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
118const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
119
[email protected]f803c932011-03-30 16:40:12120// Printer name.
121const char kSettingPrinterName[] = "printerName";
122
[email protected]b73bb80b2011-04-20 01:58:39123// Print to PDF option: true if selected, false if not.
124const char kSettingPrintToPDF[] = "printToPDF";
125
[email protected]014a62cb2013-11-09 17:23:25126// Print using Privet option: true if destination is a Privet printer, false if
127// not.
128const char kSettingPrintWithPrivet[] = "printWithPrivet";
129
130// Ticket option. Contains the ticket in CJT format.
131const char kSettingTicket[] = "ticket";
132
[email protected]19d1c2d2013-01-14 00:59:46133// Whether to print CSS backgrounds.
134const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
135
[email protected]edb363a82013-01-29 12:11:29136// Whether to print selection only.
137const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
138
[email protected]ff906742011-08-23 05:04:46139// Indices used to represent first preview page and complete preview document.
[email protected]fd0b503402011-07-26 09:01:33140const int FIRST_PAGE_INDEX = 0;
141const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
[email protected]fd0b503402011-07-26 09:01:33142
[email protected]e5324b52013-10-29 03:16:37143// Whether to show PDF in view provided by OS. Implemented for MacOS only.
[email protected]97c295752011-11-17 00:44:37144const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
[email protected]97c295752011-11-17 00:44:37145
[email protected]63313ae2011-10-13 00:40:39146#if defined (USE_CUPS)
147const char kBlack[] = "Black";
148const char kCMYK[] = "CMYK";
149const char kKCMY[] = "KCMY";
150const char kCMY_K[] = "CMY+K";
151const char kCMY[] = "CMY";
152const char kColor[] = "Color";
153const char kGray[] = "Gray";
154const char kGrayscale[] = "Grayscale";
155const char kGreyscale[] = "Greyscale";
156const char kMonochrome[] = "Monochrome";
157const char kNormal[] = "Normal";
158const char kNormalGray[] = "Normal.Gray";
159const char kRGB[] = "RGB";
160const char kRGBA[] = "RGBA";
161const char kRGB16[] = "RGB16";
162#endif
163
[email protected]c48bee22011-03-29 02:36:26164} // namespace printing