Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
May 27, 2023
Working Draft
The Printer Working Group
IPP Subset of CUPS Raster(IPP Raster)PWG Raster Format
Status: Draft
Abstract: This standard defines a simple proper subset of the CUPS Rraster format for printing, scanning, and facsimile. for use with IPP Printers. The subset The format includes support for a small set of standard and device color spaces and bit depths, and also defines Printer description attributes for IPP that enable a Client to generate or request a supported raster stream for a Printer.
Copyright © 2011 The Printer Working Group. All rights reserved.
1
2
3
4
5
6
7
8
9
1011
12
13
14
15
1617181920
21
May 27, 2023
Working Draft
The Printer Working Group
This document is a PWG Candidate Working DraftStandard. For a definition of a "PWG Candidate Working Draft Standard", see: ftp://ftp.pwg.org/pub/pwg/general/pwg-process30.pdf
This document is available electronically at:
ftp://ftp.pwg.org/pub/pwg/ipp/wd/wd-ippraster10-2011012620110223.pdf/.docx
Copyright © 2011 The Printer Working Group. All rights reserved.
222324
25
26
27
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Copyright © 2011 The Printer Working Group. All rights reserved.
This document may be copied and furnished to others, and derivative works that comment on, or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice, this paragraph and the title of the Document as referenced below are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the IEEE-ISTO and the Printer Working Group, a program of the IEEE-ISTO.
Title: IPP Subset of CUPS Raster (IPP Raster)PWG Raster Format
The IEEE-ISTO and the Printer Working Group DISCLAIM ANY AND ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED INCLUDING (WITHOUT LIMITATION) ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
The Printer Working Group, a program of the IEEE-ISTO, reserves the right to make changes to the document without further notice. The document may be updated, replaced or made obsolete by other documents at any time.
The IEEE-ISTO takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights.
Page 3 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
1
2
28
29
30313233343536
37
38
39
40414243
44
454647
48
4950515253
54
3
4
Working Draft – PWG Subset of CUPS Raster May 27, 2023
The IEEE-ISTO invites any interested party to bring to its attention any copyrights, patents, or patent applications, or other proprietary rights which may cover technology that may be required to implement the contents of this document. The IEEE-ISTO and its programs shall not be responsible for identifying patents for which a license may be required by a document and/or IEEE-ISTO Industry Group Standard or for conducting inquiries into the legal validity or scope of those patents that are brought to its attention. Inquiries may be submitted to the IEEE-ISTO by e-mail at: [email protected].
The Printer Working Group acknowledges that the IEEE-ISTO (acting itself or through its designees) is, and shall at all times, be the sole entity that may authorize the use of certification marks, trademarks, or other special designations to indicate compliance with these materials.
Use of this document is wholly voluntary. The existence of this document does not imply that there are no other ways to produce, test, measure, purchase, market, or provide other goods and services related to its scope.
About the IEEE-ISTO
The IEEE-ISTO is a not-for-profit corporation offering industry groups an innovative and flexible operational forum and support services. The IEEE-ISTO provides a forum not only to develop standards, but also to facilitate activities that support the implementation and acceptance of standards in the marketplace. The organization is affiliated with the IEEE (http://www.ieee.org/) and the IEEE Standards Association (http://standards.ieee.org/).
For additional information regarding the IEEE-ISTO and its industry programs visit:
Page 4 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
5
6
55565758596061
62
63646566
67
686970
71
72
73
747576777879
80
81
7
8
Working Draft – PWG Subset of CUPS Raster May 27, 2023
http://www.ieee-isto.org.
About the IEEE-ISTO PWG
The Printer Working Group (or PWG) is a Program of the IEEE Industry Standards and Technology Organization (ISTO) with member organizations including printer manufacturers, print server developers, operating system providers, network operating systems providers, network connectivity vendors, and print management application developers. The group is chartered to make printers and the applications and operating systems supporting them work together better. All references to the PWG in this document implicitly mean “The Printer Working Group, a Program of the IEEE ISTO.” In order to meet this objective, the PWG will document the results of their work as open standards that define print related protocols, interfaces, procedures and conventions. Printer manufacturers and vendors of printer related software will benefit from the interoperability provided by voluntary conformance to these standards.
In general, a PWG standard is a specification that is stable, well understood, and is technically competent, has multiple, independent and interoperable implementations with substantial operational experience, and enjoys significant public support.
For additional information regarding the Printer Working Group visit:
http://www.pwg.org
Page 5 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
9
10
82
83
84
85
86
87
8889909192939495969798
99
100101102
103
104
105
106
11
12
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Contact information:
The Printer Working Group
c/o The IEEE Industry Standards and Technology Organization
445 Hoes Lane
Piscataway, NJ 08854
USA
Page 6 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
13
14
107
108
109
110
111
112
113
114
115
15
16
Working Draft – PWG Subset of CUPS Raster May 27, 2023
About the Internet Printing Protocol Work Group
The Internet Printing Protocol (IPP) working group has developed a modern, full-featured network printing protocol, which is now the industry standard. IPP allows a print client to query a printer for its supported capabilities, features, and parameters to allow the selection of an appropriate printer for each print job. IPP also provides job information prior to, during, and at the end of job processing.
For additional information regarding IPP visit:
http://www.pwg.org/ipp/
Implementers of this specification are encouraged to join the IPP mailing list in order to participate in any discussions of the specification. Suggested additions, changes, or clarification to this specification, should be sent to the IPP mailing list for consideration.
Page 7 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
17
18
116
117
118119120121122
123
124
125
126
127
128129130
19
20
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Table of Contents
1. Introduction......................................................................................................................7
2. Terminology...................................................................................................................87
2.1 Conformance Terminology.......................................................................................87
2.2 Other Terminology...................................................................................................87
3. Requirements..................................................................................................................8
3.1 Rationale for the PWG Subset of CUPS Raster........................................................8
3.2 Use Models..............................................................................................................98
3.3 Design Requirements..............................................................................................98
4. Subset of CUPS Raster Format...................................................................................109
4.1 Format Version......................................................................................................109
4.2 Word Order............................................................................................................109
4.3 Page Header..........................................................................................................119
4.3.1 cupsBitsPerColor, cupsBitsPerPixel, cupsColorOrder, and cupsColorSpace. 129
4.3.2 cupsWidth and cupsHeight............................................................................1210
4.3.3 HWResolution..................................................Error! Bookmark not defined.10
5. Printer Description Attributes.....................................................................................1410
5.1 cups-back-side (type2 keyword)..........................................................................1410
5.2 cups-raster-supported (1setOf type2 keyword)....................................................1411
Page 8 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
21
22
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
23
24
Working Draft – PWG Subset of CUPS Raster May 27, 2023
6. Conformance Requirements......................................................................................1611
7. Internationalization Considerations............................................................................1711
8. Security Considerations.............................................................................................1711
9. IANA Considerations.................................................................................................1711
10. References..............................................................................................................1811
10.1 Normative References.......................................................................................1811
11. Author's Addresses..................................................................................................1911
12. Change History........................................................................................................2011
12.1 December 9, 2010.............................................................................................2012
List of Figures
No table of figures entries found.In your document, select the words to include in the table of contents, and then on the Home tab, under Styles, click a heading style. Repeat for each heading that you want to include, and then insert the table of contents in your document. To manually create a table of contents, on the Document Elements tab, under Table of Contents, point to a style and then click the down arrow button. Click one of the styles under Manual Table of Contents, and then type the entries manually.
List of Tables
Table 1 - Required Color Order, Color Space, and Bit Depth Combinations...................129
Page 9 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
25
26
151
152
153
154
155
156
157
158
159
160
161
162
163164165166167168169
170
171
172
173
27
28
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Page 10 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
29
30
174
175
31
32
Working Draft – PWG Subset of CUPS Raster May 27, 2023
1. Introduction
Historically, printer manufacturers have used a variety of proprietary or device-specific variants of industry standard page description languages (PDLs) to support printing, leading to the proliferation of so-called "printer driver" software for every supported operating system and/or platform.
Two high-level PDLs, PostScript and PDF, are sufficiently generic to be used for basic printing, however they require significant resources in the printer and can be difficult to generate and stream from some environments. Existing standard bitmap image formats have issues as well:
JPEG: Lossy compression, no multi-page support
JPEG 2000: Lossy compression, no multi-page support, resource-intensive
MNG: Resource-intensive and not widely implemented or supported
PNG: No multi-page support, resource-intensive
TIFF: Can be resource-intensive, hard to stream, multiple format variants
CUPS Raster [CUPSRASTER] is a simple bitmap container to support printing on all types of printers. It provides the following features:
Support for multiple pages
Support for standard color spaces backed by existing ICC color profiles
Page 11 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
33
34
176
177178179180
181
182183184185
186
187
188
189
190
191
192
193194
195
196
197
35
36
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Adaptable byte order for encoding and decoding
A single, lossless compression algorithm that is space, memory, and processor efficient
An easily streamable encoding
CUPS Raster has been used over existing print data transports such as the Internet Printing Protocol (IPP)CUPS Raster [CUPSRASTER] has been used to facilitate raster printing using traditional printer drivers since 1999. The format supports platform-agnostic multi-page printing using many device and standard Color Spaces, bit depths, Color Orders, and printer features. A compressed variant (version 2) uses a combination of run-length encoding compression algorithms to efficiently reduce the size of raster data when transferred over external interfaces such as networks. This variantCUPS Raster can also be further reduced in size using HTTP or IPP compression algorithms such as Compress and Flate when supported by the client or Printer.
This standard defines a proper subset of CUPS Raster for use with IPP Printers. The subset includes support for a small set of standard and device Color Spaces and bit depths, and also defines Printer description attributes for IPP that enable a Client to generate or request a supported raster stream for a Printer.
2. Terminology
2.1 Conformance Terminology
Capitalized terms, such as MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, MAY, and OPTIONAL, have special meaning relating to conformance as defined in RFC 2119 [RFC2119].
Page 12 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
37
38
198
199200
201
202
203204205206207208209210211
212
213214215216
217
218
219220221
39
40
Working Draft – PWG Subset of CUPS Raster May 27, 2023
2.2 Other Terminology
Color Component; an individual element or channel for a Color Space or Pixel, for example “Red”, “Green” and “Blue” are Color Components of the “RGB” Color Space.
Color Order; the order of Color Components within the Page Bitmap. These Color Orders are called “Chunked”, “Banded”, and “Planar” in the CUPS Raster Format specification [CUPSRASTER].
Color Space; the interpretation of color in a page bitmap, for example “RGB”, “Grayscale”, “CMYK”, and so forth.
CUPS Raster; the image file format defined by [CUPSRASTER].
PackBits; a simple run-length encoding algorithm for data compression. Each sequence is encoded as a series of repeated or non-repeated Pixels.
Page Bitmap; a rectangular grid of Pixels.
Page Header; the binary dictionary of PostScript and raster key values for a Page Bitmap.
Pixel; a set of Color Components representing a single grid point in a Page Bitmap.
Page 13 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
41
42
222
223224
225
226227228
229
230231
232
233
234
235236
237
238
239
240
241
242
43
44
Working Draft – PWG Subset of CUPS Raster May 27, 2023
3. Requirements
[3.1] Rationale for the PWG Subset of CUPS Raster Format
IPP Everywhere [IPPEVE] and IPP Scan [IPPSCAN] both require a standard raster format for printing and scanning of multiple-page documents without printer-specific driver software. CUPS Raster supports many more Color Spaces, Color Orders, bit depths, and byte orders than are needed for a modern Printer. Moreover, the PostScript page device dictionary does not map cleanly to IPP or the PWG Semantic Model, leading to additional complexities that would make interoperability difficult.
By defining a proper subset of CUPS Raster, we both enable support for a new class of IPP Printer without the use of printer- and platform-specific driver software in the client and greatly reduce the number of variables for interoperability.
3.1[3.2] Use Models
Jane has a smart phone with Wi-Fi capability and a built-in camera. She prints photos from her phone to a low-cost Wi-Fi inkjet printer. The printer has limited memory and processor resources that support basic raster printing on a variety of media types and sizes.
John has a desktop PC he uses to write whitepapers and other business documents. He prints these documents to a low-cost Ethernet workgroup laser printer with three paper trays and a duplexing accessory. The printer has enough memory to hold a partial image of one side of a sheet.
Page 14 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
45
46
243
244
245246247248249250
251
252253254
255
256257258259
260
261262263264
47
48
Working Draft – PWG Subset of CUPS Raster May 27, 2023
3.2[3.3] Out of Scope
Extensions to the CUPS Raster format and mapping of PostScript page device dictionary key/value pairs to IPP or the PWG Semantic model are out of scope for this specification because the goal is to define a simple subset for basic raster printing, scanning, and facsimile.
3.3 Design Requirements
Since both the client and IPP Printer may have limited memory, a raster format for printing must be streamable to minimize buffering.
Limited network bandwidth requires some form of data compression. Text printing favors lossless compression algorithms to preserve edge detail and resource limitations require simpler compression algorithms.
Because the client may not have sophisticated color management capabilities, standard color spaces should be used to foster improved color fidelity. Similarly, an IPP Printer may have limited space for color tables, however it should still be possible to support a managed color workflow when both the client and IPP Printer are capable. A bi-level imaging mode may also be useful when printing text and line art.
Because the IPP Printer may have limited memory, the client must be able to discover the supported raster resolutions and how to provide duplex page images – no flip, X flip, Y flip, or rotation by 180 degrees (both X and Y flip).
Page 15 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
49
50
265
266267268269
270
271272
273
274275276
277
278279280281282
283
284285286
287
51
52
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Finally, to limit the complexity of implementation the order of multi-octet values should be predefined.
[4.] Subset of CUPSPWG Raster Format
The CUPS Raster specification [CUPSRASTER] defines three format variants for the MIME media type “application/vnd.cups-raster”. The following subsections define the subset of the CUPS Raster v2 format used for the MIME media type “image/cupspwg-raster”.
[4.1] Format Versionile Organization
Figure 1 - PWG Raster File Organization shows the general organization of every PWG Raster file. Each file begins with a 32-bit synchronization word followed by zero or more pages. Each page consists of a header followed by the bitmap image for the page. The bitmap image is compressed using a PackBits-like algorithm to reduce file size without significant overhead. Integer values larger than 8-bits are specified in network byte order.
Page 16 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
53
54
288289
290
291292293294
295
296297298299300
301
302
55
56
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Figure 1 - PWG Raster File OrganizationAll “image/cups” streams MUST use format version 2.
[4.2] Word OrderSynchronization Word
All “image/cups” streams MUST use network ("big endian") byte orderThe synchronization word is a 32-bit unsigned integer with the value %x52.61.53.32 (“RaS2”).
3.4[4.3] Page Header
Table 1 - PWG Raster Page Header describes the 1796-octet page header that appears at the beginning of each page.All "image/cups" streams MUST initialize the cupsBitsPerColor, cupsBitsPerPixel, cupsBytesPerLine, cupsColorOrder, cupsColorSpace, cupsHeight, cupsWidth, and HWResolution fields in the page header. All other fields MUST be initialized to 0. The bulk of the page header is intentionally unused.
Page 17 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
Synchronization Word
Page 1 (Header + Bitmap)
Page 2 (Header + Bitmap)
...
Page N (Header + Bitmap)
57
58
303
304305
306
307308
309
310311312313314
59
60
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Table 1 - PWG Raster Page Header
Bytes Type Name Values
0-275 Reserved Reserved MUST be 0
276-279 Integer HorizontalResolution As reported by pwg-raster-resolution-supported
280-283 Integer VerticalResolution As reported by pwg-raster-resolution-supported
284-371 Reserved Reserved MUST be 0
372-375 Integer Width Width in pixels > 0
376-379 Integer Height Height in lines > 0
380-383 Reserved Reserved MUST be 0
384-387 Integer BitsPerColor 1, 8, or 16 as reported by pwg-raster-types-supported
388-391 Integer BitsPerPixel 1, 8, 16, 24, 32, 48, or 64 as reported by pwg-raster-types-supported
392-395 Integer BytesPerLine Calculated from Width and BitsPerPixel
396-399 Integer ColorOrder MUST be 0 (chunky)
400-403 Integer ColorSpace 1 = RGB (device),
3 = Black (device),
Page 18 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
61
62
315
316
63
64
Working Draft – PWG Subset of CUPS Raster May 27, 2023
6 = CMYK (device),
18 = sGray,
19 = sRGB, or
20 = AdobeRGB
as reported by pwg-raster-types-supported
404-419 Reserved Reserved MUST be 0
420-423 Integer NumColors 1, 3, or 4 as reported by pwg-raster-types-supported
424-1795 Reserved Reserved MUST be 0
3.4.1 HorizontalResolution and VerticalResolution
The HorizontalResolution and VerticalResolution fields MUST be initialized to either one of the supported values reported by the "pwg-raster-resolution-supported" attribute or a compatible lower resolution. A compatible lower resolution is an integral divisor of a "pwg-raster-resolution-supported" value, for example 360x360dpi for a printer that supports 720x720dpi or 300x300dpi for a printer that supports 2400x1200dpi.
[4.3.1] cupsBitsPerColor, cupsBitsPerPixel, cupsColorOrder, and cupsColorSpace
All “image/cups” streams MUST use one of the following combinations of cupsBitsPerColor, cupsBitsPerPixel, cupsColorOrder, and cupsColorSpace values defined in Table 1, "Allowed Color Order, Color Space, and Bit Depth Combinations".
Page 19 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
65
66
317
318319320321322
323
324
325326327
67
68
Working Draft – PWG Subset of CUPS Raster May 27, 2023
[4.3.2] cupsWidth and cupsHHeight
The cupsWidth and cupsHeight fields MUST be initialized to the full width and height of the current page in addressable units as defined by the HWorizontalResolution and VerticalResolution fields. Thus, each page bitmap provides a "full bleed" page image.
3.4.2 BitsPerColor, BitsPerPixel, ColorSpace, and NumColors
The BitsPerColor, BitsPerPixel, ColorSpace, and NumColors fields MUST be initialized to values corresponding to a “pwg-raster-resolution-supported” value, as defined in Table 2 –pwg-raster-types-supported values.
3.4.3 BytesPerLine
The BytesPerLine field MUST be initialized to the number of octets for a single uncompressed line in the page bitmap, as described by the following formula:
BytesPerLine = TRUNCATE((BitsPerPixel * Width + 7) / 8)
[4.3.3] HWResolution
The HWResolution field MUST be initialized to either one of the supported values reported by the "ipp-raster-resolution-supported" attribute or a compatible lower resolution. A
compatible lower resolution is an integral divisor of a "ipp-raster-resolution-supported" value, for example 360x360dpi for a printer that supported 720x720dpi.
Table 1 - Allowed Color Order, Color Space, and Bit Depth Combinations
cupsBits-PerColor
cupsBits-PerPixel
cupsColorSpace
ipp-raster-types-supported
1 1 3 (black) black-1
1 1 18 (sGray) sgray-1Page 20 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
69
70
328
329330331
332
333334335
336
337338
339
340
341
342343344345
346
71
72
Working Draft – PWG Subset of CUPS Raster May 27, 2023
8 8 3 (black) black-8
8 32 6 (CMYK) cmyk-8
8 8 18 (sGray) sgray-8
8 24 19 (sRGB) srgb-8
8 24 20 (AdobeRGB)
adobe-rgb-8
16 16 3 (black) black-16
16 64 6 (CMYK) cmyk-16
16 16 18 (sGray) sgray-16
16 48 19 (sRGB) srgb-16
16 48 20 (AdobeRGB)
adobe-rgb-16
[4.4] Page Bitmap
EThe page bitmap is compressed using a PackBits-like algorithm. Pixel color values are packed into an integral number of octets. 8 pixel color values are packed into a single octet for compression when BitsPerPixel is 1.
Each line of raster data begins with a repetition count from 1 to 256 that is encoded using a single octet containing "count - 1".
Page 21 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
73
74
347
348349350
351
352353
75
76
Working Draft – PWG Subset of CUPS Raster May 27, 2023
After the repetition count, whole color values for that line are run-length encoded using a PackBits-like run-length encoding algorithm: 1 to 128 repeated colors are encoded using an initial octet containing "count - 1" followed by the color value octet(s) while 2 to 128 non-repeating colors are encoded using an initial octet containing "257 - count" followed by the color value octet(s).
Figure 2 - Sample Page Image
For example, the 8x8 24-bit sRGB image shown in Figure 2 - Sample Page Image would be encoded as the following 89 octets:
%x00 %x00.FF.FF.FF %x02.FF.FF.00 %x03.FF.FF.FF
%x00 %xFE.FF.FF.00.00.00.FF.FF.FF.00 %x02.FF.FF.FF %x00.00.FF.00 %x00.FF.FF.FF
%x00 %x01.FF.FF.00 %x02.FF.FF.FF %x02.00.FF.00
%x00 %x02.FF.FF.00 %x02.FF.FF.FF %x00.00.FF.00 %x00.FF.FF.FF
Page 22 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
77
78
354
355356357358359
360
361
362
363364
365
366
367368
369
370
79
80
Working Draft – PWG Subset of CUPS Raster May 27, 2023
%x00 %x00.FF.FF.FF %x02.FF.FF.00 %x03.FF.FF.FF
%x00 %x07.FF.FF.FF
%x01 %x07.FF.00.00
The first line (%x00) contains 1 white pixel (%x00.FF.FF.FF), 3 yellow pixels (%x02.FF.FF.00), and 4 white pixels (%x03.FF.FF.FF).
The second line (%x00) contains a sequence of yellow + blue + yellow pixels (%xFE.FF.FF.00.00.00.FF.FF.FF.00), 3 white pixels (%x02.FF.FF.FF), 1 green pixel (%x00.00.FF.00), and 1 white pixel (%x00.FF.FF.FF).
The third line (%x00) contains 2 yellow pixels (%x01.FF.FF.00), 3 white pixels (%x02.FF.FF.FF), and 3 green pixels (%x02.00.FF.00)
The fourth line (%x00) contains 3 yellow pixels (%x02.FF.FF.00), 3 white pixels (%x02.FF.FF.FF), 1 green pixel (%x00.00.FF.00), and 1 white pixel (%x00.FF.FF.FF).
The fifth line (%x00) contains 1 white pixel (%x00.FF.FF.FF), 3 yellow pixels (%x02.FF.FF.00), and 4 white pixels (%x03.FF.FF.FF).
The sixth line (%x00) contains 8 white pixels (%x07.FF.FF.FF).
Page 23 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
81
82
371
372
373
374
375376
377
378379380
381
382383
384
385386
387
388389
390
391
392
83
84
Working Draft – PWG Subset of CUPS Raster May 27, 2023
The seventh and eighth lines (%x01) contain 8 red pixels (%x07.FF.00.00).ach page bitmap in an "image/cups" stream represents a full-bleed image.
4.[5.] Printer Description Attributes
This specification defines three new Printer attributes.
[5.1] ipppwg-raster-back-side (type2 keyword)
This REQUIRED Printer attribute specifies the bitmap coordinate system for the back side of duplex sheets. The following keyword values are defined:
"normal" - the back side has the origin at the top-left corner of the bitmap,
"manual-tumble" - the back side has the origin at the top-left corner of the bitmap for "two-sided-long-edge" and the bottom-right corner (rotated 180º) of the bitmap for "two-sided-short-edge",
"rotated" - the back side image has the origin at the bottom-right corner (rotated 180º) of the bitmap for "two-sided-long-edge" and the top-left corner of the bitmap for "two-sided-short-edge", or
"flipped" - the back side image has the origin at the bottom-left corner (X flipped) of the bitmap for "two-sided-long-edge" and the top-right corner (Y flipped).
Page 24 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
85
86
393394
395
396
397
398399
400
401
402
403404405
406
407408409
410
411412
413
87
88
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Figure 3 - Back side bitmap vs. "pwg-raster-back-side" and "sides" values visually shows the effect of each value on the bitmap image.
4.1 pwg-raster-resolution-supported (1setOf resolution)
This REQUIRED Printer attribute lists the supported page bitmap resolutions in dots per inch. Printers MUST accept "image/pwg-raster" streams for the highest reported resolution on the largest supported media.
4.2 pwg-raster-types-supported (1setOf type2 keyword)
This REQUIRED Printer attribute lists the supported Color Space and bit depth combinations. Table 2 – pwg-raster-types-supported values defines the keyword values for each combination.
Page 25 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
89
90
414415
416
417418419
420
421422423
424
91
92
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Figure 3 - Back side bitmap vs. "pwg-raster-back-side" and "sides" values ipp-raster-resolution-supported (1setOf resolution)
This REQUIRED Printer attribute lists the supported bitmap resolutions in dots per inch. Printers MUST accept "image/cups" streams for the highest reported resolution on the
largest supported media.
ipp-raster-types-supported (1setOf type2 keyword)
This REQUIRED Printer attribute lists the supported Color Space and bit depth combinations. Table 1, "Allowed Color Order, Color Space, and Bit Depth Combinations",
defines the keyword values for each combination.
Page 26 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
93
94
425
426427
428429430
431
432433434
435
95
96
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Table 2 – pwg-raster-types-supported values
pwg-raster-types-supported
BitsPerColor BitsPerPixel
ColorSpace NumColors
black-1 1 1 3 1
sgray-1 1 1 18 1
black-8 8 8 3 1
cmyk-8 8 32 6 4
sgray-8 8 8 18 1
srgb-8 8 24 19 3
adobe-rgb-8 8 24 20 3
black-16 16 16 3 1
cmyk-16 16 64 6 4
sgray-16 16 16 18 1
srgb-16 16 48 19 3
adobe-rgb-16 16 48 20 3
[6.] Conformance Requirements
4.3[6.1] IPP Printer Conformance Requirements
To claim conformance to this specification, an IPP Printer implementation MUST:
Page 27 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
97
98
436
437
438
439
440
99
100
Working Draft – PWG Subset of CUPS Raster May 27, 2023
(a) support the "image/cupspwg-raster" MIME media type as defined in section 4 of this specification,;
(b) support all IPP attributes defined in section 5 of this specification,;
(c) support PWG Raster streams at the highest reported resolution reported by the “pwg-raster-resolution-supported” attribute and largest media size reported by the “media-supported” attribute,
(d) support PWG Raster streams with all resolutions compatible with the values reported by the “pwg-raster-resolution-supported” attribute as defined in section 4.3.1 of this specification, and
(ec) conform to the Internationalization Considerations defined in section 7 of this specification; and
(d) conform to the Security Considerations defined in section 8 of this specification.
An IPP Printer SHOULD:
(a) support the IPP “compression” attribute with the values “compress”, “deflate”, and/or “gzip” to further reduce the size of PWG Raster documents.
4.4[6.2] IPP Client Conformance Requirements
To claim conformance to this specification, an IPP Client MUST:
(a) generate document data conforming to the "image/cupspwg-raster" MIME media type as defined in section 4 of this specification,;
(b) explicitly identify the supported values of all IPP attributes defined in section 5 of this specification;,
Page 28 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
101
102
441442
443
444445446
447448449
450451
452
453
454
455456
457
458
459460
461462
103
104
Working Draft – PWG Subset of CUPS Raster May 27, 2023
(c) generate PWG Raster streams at a compatible resolution and size as reported by the “pwg-raster-resolution-supported” and “media-supported” attributes and as defined in section 4.3.1 of this specification, and
(dc) conform to the Internationalization Considerations defined in section 7 of this specification; and
(d) conform to the Security Considerations defined in section 8 of this specification.
An IPP Client SHOULD:
(a) support the IPP “compression” attribute with the values “compress”, “deflate”, and/or “gzip” to further reduce the size of PWG Raster documents.
4.5 PWG Raster Consumer Requirements
To claim conformance to this specification, a PWG Raster consumer MUST:
(a) support the "image/pwg-raster" MIME media type as defined in section 4 of this specification and
(b) conform to the Security Considerations defined in section 8 of this specification.
4.6 PWG Raster Producer Requirements
To claim conformance to this specification, a PWG Raster producer MUST:
(a) generate document data conforming to the "image/pwg-raster" MIME media type as defined in section 4 of this specification and
(b) conform to the Security Considerations defined in section 8 of this specification.
Page 29 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
105
106
463464465
466467
468
469
470
471472
473
474
475476
477
478
479
480481
482
107
108
Working Draft – PWG Subset of CUPS Raster May 27, 2023
5.[7.] Internationalization Considerations
For interoperability and basic support for multiple languages, conforming implementations MUST support the UTF-8 [RFC3629] encoding of Unicode [UNICODE] [ISO10646]Because PWG Raster streams contain no localizable text, there are no internationalization considerations for the PWG Raster format.
6.[8.] Security Considerations
The security considerations for IPP are described in Section 8 of RFC 2911 [RFC2911]. Consumers of PWG Raster streams IPP Printers MUST range check all page header and bitmap values to protect against integer and buffer overflows.
7.[9.] IANA Considerations
7.1 MIME Media Type Registration
Name : Michael Sweet
E-mail : [email protected]
MIME media type name : Image
MIME subtype name : Standards Tree -– cupspwg-raster
Required parameters : NONE
Page 30 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
109
110
483
484485486487
488
489490491
492
493
494
495
496
497
498
499
500
501
502
111
112
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Optional parameters : NONE
Encoding considerations :
8-bit (raw) binary data.
Security considerations :
Raster data can be very large, which could fill a filesystem and
cause a denial of service or system failure.
Raster data contains no executables or macros. Authentication and
access control are normally handled by the Internet Printing Protocol
and Hyper-Text Transport Protocol.
Interoperability considerations :
NONE
Published specification :
ftp://ftp.pwg.org/pub/pwg/candidates/cs-ippraster10-YYYYMMDD.pdf
Page 31 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
113
114
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
115
116
Working Draft – PWG Subset of CUPS Raster May 27, 2023
Applications which use this media :
CUPS
IPP Everywhere
IPP Scan
Additional information :
1. Magic number(s) :
2. File extension(s) :
3. Macintosh file type code :
Person to contact for further information :
1. Name : Michael Sweet
2. E-mail : [email protected]
Intended usage : Common
Used for printing "raw" image data in formats acceptable to printers.
Author/Change controller :
Page 32 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
117
118
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
119
120
Working Draft – PWG Subset of CUPS Raster May 27, 2023
The Printer Working Group
c/o The IEEE Industry Standards and Technology Organization
445 Hoes Lane
Piscataway, NJ 08854
USAMichael Sweet
Apple Inc.
10431 N. De Anza Blvd.
MS 38-4LPT
Cupertino CA 95014
8.[10.] References
8.1[10.1] Normative References
[CUPSRASTER] “CUPS Raster Format”, http://www.cups.org/spec-raster.html
[RFC2911] "Internet Printing Protocol/1.1: Model and Semantics"
[RFC3805] "Printer MIB v2"
9.[11.] Author's Addresses
Michael Sweet
Apple Inc.
10431 N. De Anza Blvd.
Page 33 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
121
122
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
123
124
Working Draft – PWG Subset of CUPS Raster May 27, 2023
MS 38-4LPT
Cupertino CA 95014
Page 34 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
125
126
561
562
563
127
128
Working Draft – PWG Subset of CUPS Raster May 27, 2023
10.[12.] Change History
[ PWG Secretary: This section must be removed when Document is approved ]
10.1[12.1] February 23, 2011
1. Updated MIME media type to image/pwg-raster2. Updated IPP attributes to be pwg-raster-xxx instead of ipp-raster-xxx3. Added Out of Scope section4. Updated introduction and rationale to cover scanning5. Updated PWG Raster format definition (section 4) to contain a complete description, including
tables and figures, for the CUPS Raster v2 format.6. Updated pwg-raster-types-supported and pwg-raster-back-side to include figures and tables7. Updated conformance section8. Update IETF registration information
10.2 January 26, 2011
1. Updated document title and filename to use "IPP" as the prefix instead of "PWG".2. Added normative references to RFC 2911 and RFC 38053. Changed "cups-raster" prefix on attributes to "ipp-raster"4. Added "ipp-raster-resolutions-supported" attribute5. Added page bitmap section6. Added conformance requirements7. Added IANA registration info
10.3[12.2] January 24, 2011
Initial draft.
Page 35 of 35 Copyright © 2011 The Printer Working Group, All rights reserved.
129
130
564
565
566
567568569570571572573574575
576
577578579580581582583
584
585
131
132