blob: 42a0d48ed18bafa7a9238a32e8776db76298f4c1 [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.
16const char kPreviewUIAddr[] = "previewUIAddr";
17
[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]151b4f242011-08-19 20:21:2858// Default character spacing for text while printing headers and footers.
59// (For CoreGraphics only).
60const int kSettingHeaderFooterCharacterSpacing = 0;
61
[email protected]55b23a02011-08-17 23:09:3662// Default font family name for printing the headers and footers.
63const char kSettingHeaderFooterFontFamilyName[] = "sans";
64
65// Default font name for printing the headers and footers.
66const char kSettingHeaderFooterFontName[] = "Helvetica";
67
68// Default font size for printing the headers and footers.
69const int kSettingHeaderFooterFontSize = 8;
70
71// Number of horizontal regions for headers and footers.
72const float kSettingHeaderFooterHorizontalRegions = 3;
73
[email protected]06bd18662011-10-07 06:12:4074// Interstice or gap between different header footer components. Hardcoded to
75// about 0.5cm, match the value in PrintSettings::SetPrinterPrintableArea.
76const float kSettingHeaderFooterInterstice = 14.2f;
[email protected]55b23a02011-08-17 23:09:3677
78// Key that specifies the date of the page that will be printed in the headers
79// and footers.
80const char kSettingHeaderFooterDate[] = "date";
81
82// Key that specifies the title of the page that will be printed in the headers
83// and footers.
84const char kSettingHeaderFooterTitle[] = "title";
85
86// Key that specifies the URL of the page that will be printed in the headers
87// and footers.
88const char kSettingHeaderFooterURL[] = "url";
89
[email protected]c48bee22011-03-29 02:36:2690// Page orientation: true for landscape, false for portrait.
91const char kSettingLandscape[] = "landscape";
92
[email protected]7a9b03e32011-08-23 19:56:1893// Key that specifies the bottom margin of the page.
94const char kSettingMarginBottom[] = "marginBottom";
95
96// Key that specifies the left margin of the page.
97const char kSettingMarginLeft[] = "marginLeft";
98
99// Key that specifies the right margin of the page.
100const char kSettingMarginRight[] = "marginRight";
101
102// Key that specifies the top margin of the page.
103const char kSettingMarginTop[] = "marginTop";
104
[email protected]6a7fdfd2011-10-13 09:05:42105// Key that specifies the dictionary of custom margins as set by the user.
106const char kSettingMarginsCustom[] = "marginsCustom";
107
108// Key that specifies the type of margins to use. Value is an int from the
109// MarginType enum.
110const char kSettingMarginsType[] = "marginsType";
[email protected]7a9b03e32011-08-23 19:56:18111
[email protected]06cb23882011-04-23 01:58:22112// A page range.
113const char kSettingPageRange[] = "pageRange";
114
115// The first page of a page range. (1-based)
116const char kSettingPageRangeFrom[] = "from";
117
118// The last page of a page range. (1-based)
119const char kSettingPageRangeTo[] = "to";
120
[email protected]d75a0317e2011-10-17 20:20:40121const char kSettingPreviewModifiable[] = "previewModifiable";
122
[email protected]0e77a1d2012-03-20 03:10:20123// Keys that specifies the printable area details.
124const char kSettingPrintableAreaX[] = "printableAreaX";
125const char kSettingPrintableAreaY[] = "printableAreaY";
126const char kSettingPrintableAreaWidth[] = "printableAreaWidth";
127const char kSettingPrintableAreaHeight[] = "printableAreaHeight";
128
[email protected]f803c932011-03-30 16:40:12129// Printer name.
130const char kSettingPrinterName[] = "printerName";
131
[email protected]b73bb80b2011-04-20 01:58:39132// Print to PDF option: true if selected, false if not.
133const char kSettingPrintToPDF[] = "printToPDF";
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]97c295752011-11-17 00:44:37139#if defined(OS_MACOSX)
140const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview";
141#endif
142
[email protected]63313ae2011-10-13 00:40:39143#if defined (USE_CUPS)
144const char kBlack[] = "Black";
145const char kCMYK[] = "CMYK";
146const char kKCMY[] = "KCMY";
147const char kCMY_K[] = "CMY+K";
148const char kCMY[] = "CMY";
149const char kColor[] = "Color";
150const char kGray[] = "Gray";
151const char kGrayscale[] = "Grayscale";
152const char kGreyscale[] = "Greyscale";
153const char kMonochrome[] = "Monochrome";
154const char kNormal[] = "Normal";
155const char kNormalGray[] = "Normal.Gray";
156const char kRGB[] = "RGB";
157const char kRGBA[] = "RGBA";
158const char kRGB16[] = "RGB16";
159#endif
160
[email protected]c48bee22011-03-29 02:36:26161} // namespace printing