blob: 9a28ddb132570277b05abcb15d92b5f4cd67ffd0 [file] [log] [blame]
Torne (Richard Coles)58218062012-11-14 11:43:16 +00001// 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.
4
5#include "printing/print_job_constants.h"
6
7namespace printing {
8
9// True if this is the first preview request.
10const char kIsFirstRequest[] = "isFirstRequest";
11
12// Unique ID sent along every preview request.
13const char kPreviewRequestID[] = "requestID";
14
15// Unique ID to identify a print preview UI.
16const char kPreviewUIID[] = "previewUIID";
17
18// Print using cloud print: true if selected, false if not.
19const char kSettingCloudPrintId[] = "cloudPrintID";
20
21// Print using cloud print dialog: true if selected, false if not.
22const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
23
24// Print job setting 'collate'.
25const char kSettingCollate[] = "collate";
26
27// Print out color: true for color, false for grayscale.
28const char kSettingColor[] = "color";
29
30// Default to color on or not.
31const char kSettingSetColorAsDefault[] = "setColorAsDefault";
32
33// 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
39// Number of copies.
40const char kSettingCopies[] = "copies";
41
42// Device name: Unique printer identifier.
43const char kSettingDeviceName[] = "deviceName";
44
45// Print job duplex mode.
46const char kSettingDuplexMode[] = "duplex";
47
48// Option to fit source page contents to printer paper size: true if
49// selected else false.
50const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
51
52// True, when a new set of draft preview data is required.
53const char kSettingGenerateDraftData[] = "generateDraftData";
54
55// Option to print headers and Footers: true if selected, false if not.
56const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
57
Torne (Richard Coles)58218062012-11-14 11:43:16 +000058// 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;
61
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
74// Page orientation: true for landscape, false for portrait.
75const char kSettingLandscape[] = "landscape";
76
77// 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
89// 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";
95
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +000096// Number of pages to print.
97const char kSettingPreviewPageCount[] = "pageCount";
98
Torne (Richard Coles)58218062012-11-14 11:43:16 +000099// 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
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000108// Page size of document to print.
109const char kSettingPageWidth[] = "pageWidth";
110const char kSettingPageHeight[] = "pageHeight";
111
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000112const char kSettingPreviewModifiable[] = "previewModifiable";
113
114// Keys that specifies the printable area details.
115const char kSettingPrintableAreaX[] = "printableAreaX";
116const char kSettingPrintableAreaY[] = "printableAreaY";
117const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
118const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
119
120// Printer name.
121const char kSettingPrinterName[] = "printerName";
122
123// Print to PDF option: true if selected, false if not.
124const char kSettingPrintToPDF[] = "printToPDF";
125
Torne (Richard Coles)f2477e02013-11-28 11:55:43 +0000126// 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
Torne (Richard Coles)2a99a7e2013-03-28 15:31:22 +0000133// Whether to print CSS backgrounds.
134const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
135
136// Whether to print selection only.
137const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
138
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000139// Indices used to represent first preview page and complete preview document.
140const int FIRST_PAGE_INDEX = 0;
141const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
142
Torne (Richard Coles)1e9bf3e2013-10-31 11:16:26 +0000143// Whether to show PDF in view provided by OS. Implemented for MacOS only.
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000144const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
Torne (Richard Coles)58218062012-11-14 11:43:16 +0000145
146#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
164} // namespace printing