From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:CUPS raster" |
|---|
| claim | "Apple raster (URF) file header is the sync UNIR plus 8 bytes 'A','S','T',0 and a big-endian page count; each page then has a 32-byte big-endian header (offsets from the reader and writer)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Apple URF / UNIRAST" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "urf_page_header" |
|---|
| size | "0x20" |
|---|
| endianness | "big" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "bits_per_pixel" |
|---|
|
| offset | "0x1" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "colorspace (0 SW, 1 sRGB, 2 CIELab, 3 AdobeRGB, 4 W, 5 RGB, 6 CMYK)" |
|---|
|
| offset | "0x2" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "duplex (1 simplex, 2 tumble, 3 normal duplex)" |
|---|
|
| offset | "0x3" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "print_quality" |
|---|
|
| offset | "0x4" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "media_type_index" |
|---|
|
| offset | "0x5" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "media_position" |
|---|
|
| offset | "0xC" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "width" |
|---|
|
| offset | "0x10" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "height" |
|---|
|
| offset | "0x14" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "resolution_dpi" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "reader decodes appleheader[0..23] into the cups header; colorspace table rawcspace; appleheader[2]>=2 is Duplex, ==2 Tumble" |
|---|
| repo | "OpenPrinting/cups" |
|---|
| commit | "cf2fc5c9390264e4cc0c0d02abdde1a18218b07e" |
|---|
| path | "cups/raster-stream.c" |
|---|
| lines | "941-1008" |
|---|
|
| type | "source" |
|---|
| detail | "writer: first page writes 'AST\0' + page count (8 bytes), then each page a 32-byte header with the other bytes zero" |
|---|
| repo | "OpenPrinting/cups" |
|---|
| commit | "cf2fc5c9390264e4cc0c0d02abdde1a18218b07e" |
|---|
| path | "cups/raster-stream.c" |
|---|
| lines | "1336-1395" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Apple URF page header" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T08:37:24.871Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T08:50:40.935Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read cups/raster-stream.c at the cited commit: the reader decodes a 32-byte appleheader (bpp [0], colorspace [1] via rawcspace table, duplex [2] with >=2 Duplex and ==2 Tumble, print quality [3], media type index [4], media position [5], big-endian width [12-15], height [16-19], dpi [20-23]); the writer emits 'A','S','T',0 plus a big-endian page count before the first page header and zero-fills the rest. Matches." |
|---|
|
|
|---|