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 7 namespace printing { 8 9 // True if this is the first preview request. 10 const char kIsFirstRequest[] = "isFirstRequest"; 11 12 // Unique ID sent along every preview request. 13 const char kPreviewRequestID[] = "requestID"; 14 15 // Unique ID to identify a print preview UI. 16 const char kPreviewUIID[] = "previewUIID"; 17 18 // Capabilities option. Contains the capabilities in CDD format. 19 const char kSettingCapabilities[] = "capabilities"; 20 21 // Print using cloud print: true if selected, false if not. 22 const char kSettingCloudPrintId[] = "cloudPrintID"; 23 24 // Print using cloud print dialog: true if selected, false if not. 25 const char kSettingCloudPrintDialog[] = "printWithCloudPrint"; 26 27 // Print job setting 'collate'. 28 const char kSettingCollate[] = "collate"; 29 30 // Print out color: true for color, false for grayscale. 31 const char kSettingColor[] = "color"; 32 33 // Default to color on or not. 34 const char kSettingSetColorAsDefault[] = "setColorAsDefault"; 35 36 // Key that specifies the height of the content area of the page. 37 const char kSettingContentHeight[] = "contentHeight"; 38 39 // Key that specifies the width of the content area of the page. 40 const char kSettingContentWidth[] = "contentWidth"; 41 42 // Number of copies. 43 const char kSettingCopies[] = "copies"; 44 45 // Device name: Unique printer identifier. 46 const char kSettingDeviceName[] = "deviceName"; 47 48 // Print job duplex mode. 49 const char kSettingDuplexMode[] = "duplex"; 50 51 // Option to fit source page contents to printer paper size: true if 52 // selected else false. 53 const char kSettingFitToPageEnabled[] = "fitToPageEnabled"; 54 55 // True, when a new set of draft preview data is required. 56 const char kSettingGenerateDraftData[] = "generateDraftData"; 57 58 // Option to print headers and Footers: true if selected, false if not. 59 const 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. 63 const float kSettingHeaderFooterInterstice = 14.2f; 64 65 // Key that specifies the date of the page that will be printed in the headers 66 // and footers. 67 const char kSettingHeaderFooterDate[] = "date"; 68 69 // Key that specifies the title of the page that will be printed in the headers 70 // and footers. 71 const char kSettingHeaderFooterTitle[] = "title"; 72 73 // Key that specifies the URL of the page that will be printed in the headers 74 // and footers. 75 const char kSettingHeaderFooterURL[] = "url"; 76 77 // Page orientation: true for landscape, false for portrait. 78 const char kSettingLandscape[] = "landscape"; 79 80 // Key that specifies the requested media size. 81 const char kSettingMediaSize[] = "mediaSize"; 82 83 // Key that specifies the requested media height in microns. 84 const char kSettingMediaSizeHeightMicrons[] = "height_microns"; 85 86 // Key that specifies the requested media width in microns. 87 const char kSettingMediaSizeWidthMicrons[] = "width_microns"; 88 89 // Key that specifies the requested media platform specific vendor id. 90 const char kSettingMediaSizeVendorId[] = "vendor_id"; 91 92 // Key that specifies the bottom margin of the page. 93 const char kSettingMarginBottom[] = "marginBottom"; 94 95 // Key that specifies the left margin of the page. 96 const char kSettingMarginLeft[] = "marginLeft"; 97 98 // Key that specifies the right margin of the page. 99 const char kSettingMarginRight[] = "marginRight"; 100 101 // Key that specifies the top margin of the page. 102 const char kSettingMarginTop[] = "marginTop"; 103 104 // Key that specifies the dictionary of custom margins as set by the user. 105 const char kSettingMarginsCustom[] = "marginsCustom"; 106 107 // Key that specifies the type of margins to use. Value is an int from the 108 // MarginType enum. 109 const char kSettingMarginsType[] = "marginsType"; 110 111 // Number of pages to print. 112 const char kSettingPreviewPageCount[] = "pageCount"; 113 114 // A page range. 115 const char kSettingPageRange[] = "pageRange"; 116 117 // The first page of a page range. (1-based) 118 const char kSettingPageRangeFrom[] = "from"; 119 120 // The last page of a page range. (1-based) 121 const char kSettingPageRangeTo[] = "to"; 122 123 // Page size of document to print. 124 const char kSettingPageWidth[] = "pageWidth"; 125 const char kSettingPageHeight[] = "pageHeight"; 126 127 const char kSettingPreviewModifiable[] = "previewModifiable"; 128 129 // Keys that specifies the printable area details. 130 const char kSettingPrintableAreaX[] = "printableAreaX"; 131 const char kSettingPrintableAreaY[] = "printableAreaY"; 132 const char kSettingPrintableAreaWidth[] = "printableAreaWidth"; 133 const char kSettingPrintableAreaHeight[] = "printableAreaHeight"; 134 135 // Printer name. 136 const char kSettingPrinterName[] = "printerName"; 137 138 // Printer description. 139 const char kSettingPrinterDescription[] = "printerDescription"; 140 141 // Additional printer options. 142 const char kSettingPrinterOptions[] = "printerOptions"; 143 144 // Print to PDF option: true if selected, false if not. 145 const char kSettingPrintToPDF[] = "printToPDF"; 146 147 // Print using Privet option: true if destination is a Privet printer, false if 148 // not. 149 const char kSettingPrintWithPrivet[] = "printWithPrivet"; 150 151 // Ticket option. Contains the ticket in CJT format. 152 const char kSettingTicket[] = "ticket"; 153 154 // Whether to print CSS backgrounds. 155 const char kSettingShouldPrintBackgrounds[] = "shouldPrintBackgrounds"; 156 157 // Whether to print selection only. 158 const char kSettingShouldPrintSelectionOnly[] = "shouldPrintSelectionOnly"; 159 160 // Indices used to represent first preview page and complete preview document. 161 const int FIRST_PAGE_INDEX = 0; 162 const int COMPLETE_PREVIEW_DOCUMENT_INDEX = -1; 163 164 // Whether to show PDF in view provided by OS. Implemented for MacOS only. 165 const char kSettingOpenPDFInPreview[] = "OpenPDFInPreview"; 166 167 #if defined (USE_CUPS) 168 const char kBlack[] = "Black"; 169 const char kCMYK[] = "CMYK"; 170 const char kKCMY[] = "KCMY"; 171 const char kCMY_K[] = "CMY+K"; 172 const char kCMY[] = "CMY"; 173 const char kColor[] = "Color"; 174 const char kGray[] = "Gray"; 175 const char kGrayscale[] = "Grayscale"; 176 const char kGreyscale[] = "Greyscale"; 177 const char kMonochrome[] = "Monochrome"; 178 const char kNormal[] = "Normal"; 179 const char kNormalGray[] = "Normal.Gray"; 180 const char kRGB[] = "RGB"; 181 const char kRGBA[] = "RGBA"; 182 const char kRGB16[] = "RGB16"; 183 #endif 184 185 } // namespace printing 186