print_job_constants.cc revision effb81e5f8246d0db0270817048dc992db66e9fb
1// 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// Capabilities option. Contains the capabilities in CDD format.
19const char kSettingCapabilities[] = "capabilities";
20
21// Print using cloud print: true if selected, false if not.
22const char kSettingCloudPrintId[] = "cloudPrintID";
23
24// Print using cloud print dialog: true if selected, false if not.
25const char kSettingCloudPrintDialog[] = "printWithCloudPrint";
26
27// Print job setting 'collate'.
28const char kSettingCollate[] = "collate";
29
30// Print out color: true for color, false for grayscale.
31const char kSettingColor[] = "color";
32
33// Default to color on or not.
34const char kSettingSetColorAsDefault[] = "setColorAsDefault";
35
36// 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
42// Number of copies.
43const char kSettingCopies[] = "copies";
44
45// Device name: Unique printer identifier.
46const char kSettingDeviceName[] = "deviceName";
47
48// Print job duplex mode.
49const char kSettingDuplexMode[] = "duplex";
50
51// Option to fit source page contents to printer paper size: true if
52// selected else false.
53const char kSettingFitToPageEnabled[] = "fitToPageEnabled";
54
55// True, when a new set of draft preview data is required.
56const char kSettingGenerateDraftData[] = "generateDraftData";
57
58// Option to print headers and Footers: true if selected, false if not.
59const char kSettingHeaderFooterEnabled[] = "headerFooterEnabled";
60
61// 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;
64
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
77// Page orientation: true for landscape, false for portrait.
78const char kSettingLandscape[] = "landscape";
79
80// Key that specifies the bottom margin of the page.
81const char kSettingMarginBottom[] = "marginBottom";
82
83// Key that specifies the left margin of the page.
84const char kSettingMarginLeft[] = "marginLeft";
85
86// Key that specifies the right margin of the page.
87const char kSettingMarginRight[] = "marginRight";
88
89// Key that specifies the top margin of the page.
90const char kSettingMarginTop[] = "marginTop";
91
92// Key that specifies the dictionary of custom margins as set by the user.
93const char kSettingMarginsCustom[] = "marginsCustom";
94
95// Key that specifies the type of margins to use.  Value is an int from the
96// MarginType enum.
97const char kSettingMarginsType[] = "marginsType";
98
99// Number of pages to print.
100const char kSettingPreviewPageCount[] = "pageCount";
101
102// A page range.
103const char kSettingPageRange[] = "pageRange";
104
105// The first page of a page range. (1-based)
106const char kSettingPageRangeFrom[] = "from";
107
108// The last page of a page range. (1-based)
109const char kSettingPageRangeTo[] = "to";
110
111// Page size of document to print.
112const char kSettingPageWidth[] = "pageWidth";
113const char kSettingPageHeight[] = "pageHeight";
114
115const char kSettingPreviewModifiable[] = "previewModifiable";
116
117// Keys that specifies the printable area details.
118const char kSettingPrintableAreaX[] = "printableAreaX";
119const char kSettingPrintableAreaY[] = "printableAreaY";
120const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
121const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
122
123// Printer name.
124const char kSettingPrinterName[] = "printerName";
125
126// Printer description.
127const char kSettingPrinterDescription[] = "printerDescription";
128
129// Additional printer options.
130const char kSettingPrinterOptions[] = "printerOptions";
131
132// Print to PDF option: true if selected, false if not.
133const char kSettingPrintToPDF[] = "printToPDF";
134
135// Print using Privet option: true if destination is a Privet printer, false if
136// not.
137const char kSettingPrintWithPrivet[] = "printWithPrivet";
138
139// Ticket option. Contains the ticket in CJT format.
140const char kSettingTicket[] = "ticket";
141
142// Whether to print CSS backgrounds.
143const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds";
144
145// Whether to print selection only.
146const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly";
147
148// Indices used to represent first preview page and complete preview document.
149const int FIRST_PAGE_INDEX = 0;
150const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1;
151
152// Whether to show PDF in view provided by OS. Implemented for MacOS only.
153const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
154
155#if defined (USE_CUPS)
156const char kBlack[] = "Black";
157const char kCMYK[] = "CMYK";
158const char kKCMY[] = "KCMY";
159const char kCMY_K[] = "CMY+K";
160const char kCMY[] = "CMY";
161const char kColor[] = "Color";
162const char kGray[] = "Gray";
163const char kGrayscale[] = "Grayscale";
164const char kGreyscale[] = "Greyscale";
165const char kMonochrome[] = "Monochrome";
166const char kNormal[] = "Normal";
167const char kNormalGray[] = "Normal.Gray";
168const char kRGB[] = "RGB";
169const char kRGBA[] = "RGBA";
170const char kRGB16[] = "RGB16";
171#endif
172
173}  // namespace printing
174