1
.TH xqxdecode 1 "${MODpage}" "xqxdecode ${MODver}"
2
'\"==========================================================================
4
'\"==========================================================================
6
'\" Define strings for special characters that nroff doesn't have
8
'\" N.B. using .if cua to test for special characters did not work.
10
.if !'\*[.T]'ps' .ds ua up
11
.if '\*[.T]'ps' .ds ua \(ua
12
.if !'\*[.T]'ps' .ds da down
13
.if '\*[.T]'ps' .ds da \(da
14
.if !'\*[.T]'ps' .ds <- left
15
.if '\*[.T]'ps' .ds <- \(<-
16
.if !'\*[.T]'ps' .ds -> right
17
.if '\*[.T]'ps' .ds -> \(->
19
'\" bx - box a Courier string for making keycaps
21
'\" N.B. this mess is to make the line drawing come out only
22
'\" if we are really generating postscript
30
'\" \(br\|\s-1\f(CB\\$1\fP\s+1\|\(br\l'|0\(rn'\l'|0\(ul'
32
. nr par*bxw \w'\\$1'+.4m
33
\Z'\v'.25m'\D'l 0 -1m'\D'l \\n[par*bxw]u 0'\D'l 0 1m'\D'l -\\n[par*bxw]u 0''\
34
\Z'\h'.2m'\s-1\\$1\s+1'\
44
'\" strings to set current color (null with old groff)
46
.if mred .ds red \m[red]
47
.if mgreen .ds green \m[green]
48
.if mblue .ds blue \m[blue]
49
.if mblack .ds black \m[black]
52
'\" fix for grotty + xterm. We call for orange, grotty outputs yellow,
53
'\" but xterm displays yellow as orange. The cycle is complete.
55
.if n .defcolor orange rgb #ffff00
57
'\" color <color> - set the current color (ignores request with old groff)
63
'\" colorword <color> <word> - colorize a word (ignored by old groff)
66
.ie m\\$1 \m[\\$1]\\$2\mP\c
70
'\" colbox <fg> <bg> <word> - colorize a word in a filled box
75
\D'P 0 -0.9v \w'\\$3'u 0 0 +0.9v -\w'\\$3'u 0'\
81
'\" Macros for doing pdfmarks
84
\\k_\X'ps: \\$*'\h'|\\n_u'\c
87
'\" pdfmark PDFMARKCODE
92
. specialps exec [\\$1 pdfmark
98
.pdfmark "/Dest /\\$1 /View [/XYZ -5 PL null] /DEST"
101
'\" pdfbookmark COUNT LINKNAME STRING
104
. pdfmark "/View [/XYZ 44 730 1.0] /Count \\$1 /Dest /\\$2 /Title (\\$3) /OUT"
107
'\" Define the SH and SS macros to save pdfmark information
108
'\" in "arrays" of numbers and strings.
113
. nr rr_levels!\\n+[rr_n] 2
114
. ds rr_labels!\\n[rr_n] \\$*
115
. pdfdest Link\\n[rr_n]
118
. nr rr_levels!\\n+[rr_n] 3
119
. ds rr_labels!\\n[rr_n] \\$*
120
. pdfdest Link\\n[rr_n]
124
'\" Called at the end of the document to generate the pdfmark outline
127
.nr rr_levels!\\n+[rr_n] 1
129
.while \\n+[rr_i]<\\n[rr_n] \{\
130
. nr rr_ip1 \\n[rr_i]+1
132
. if \\n[rr_levels!\\n[rr_ip1]]>\\n[rr_levels!\\n[rr_i]] \{\
133
. nr rr_j \\n[rr_i] 1
134
. while \\n+[rr_j]<\\n[rr_n] \{\
135
. if \\n[rr_levels!\\n[rr_j]]<=\\n[rr_levels!\\n[rr_i]] \{\
138
. if \\n[rr_levels!\\n[rr_j]]==(\\n[rr_levels!\\n[rr_i]]+1) \{\
139
. nr rr_count \\n[rr_count]+1
143
. ds hhh \\*[rr_labels!\\n[rr_i]]
144
. pdfbookmark \\n[rr_count] Link\\n[rr_i] "\\*[hhh]"
148
'\" Some postscript to make pdfmarks harmless on old interpreters...
150
.specialps "def /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse"
152
'\" Force display of Bookmarks in Acrobat when document is viewed.
154
.pdfmark "[/PageMode /UseOutlines /Page 1 /View [/XYZ null null null] /DOCVIEW"
156
'\" Output the document info in pdfmarks
159
/Title (\*[an-title](\*[an-section])) \
160
/Subject (zjsdecode Manual Page) \
161
/Author (Rick Richardson) \
162
/Keywords (printing, ZjStream) \
163
/Creator (groff \n(.x.\n(.y.\n(.Y -man) \
164
/CreationDate (\*[an-extra1]) \
165
/ModDate (\*[an-extra1]) \
169
'\" The manual page name is only 1st level mark
171
.nr rr_levels!\n+[rr_n] 1
172
.ds rr_labels!\n[rr_n] \*[an-title](\*[an-section])
173
.pdfdest Link\n[rr_n]
174
'\"==========================================================================
175
'\" MANUAL PAGE SOURCE
176
'\"==========================================================================
178
xqxdecode \- Decode a XQX stream into human readable form.
181
.RI [ options "] <" zjs-file
184
decodes a XQX stream into human readable form.
186
An XQX stream is the printer langauge used by some HP LaserJet
187
printers, such as the HP LaserJet M1005 (MFP).
189
.SH COMMAND LINE OPTIONS
190
These are the options that can appear on the command line.
193
Basename of .pbm file for saving decompressed planes.
196
Print hex file offsets.
205
Decode an XQX stream file created by foo2xqx.
209
$ xqxdecode -h < testpage.xm
210
0: \\033%-12345X@PJL JOB
211
12: @PJL SET JAMRECOVERY=OFF
212
2b: @PJL SET DENSITY=3
213
3e: @PJL SET ECONOMODE=OFF
214
55: @PJL SET RET=MEDIUM
216
7a: @PJL USTATUS DEVICE = ON
217
93: @PJL USTATUS JOB = ON
218
a9: @PJL USTATUS PAGE = ON
219
c0: @PJL USTATUS TIMED = 30
220
10c: @PJL SET JOBATTR="JobAttr4=20061118160242"
221
10c: XQX_MAGIC, 0x5851582c (,XQX)
222
110: XQX_START_DOC(1), 7 items
223
118: XQX_0x80000000, 84 (0x54)
224
124: XQX_0x10000005, 1 (0x1)
225
130: XQX_0x10000001, 0 (0x0)
226
13c: XQXI_DMDUPLEX, 0 (0x0)
227
148: XQX_0x10000000, 0 (0x0)
228
154: XQX_0x10000003, 1 (0x1)
229
160: XQXI_END, 3735928559 (0xdeadbeef)
230
16c: XQX_START_PAGE(3), 15 items [Page 1]
231
174: XQX_0x80000000, 180 (0xb4)
232
180: XQX_0x20000005, 1 (0x1)
233
18c: XQXI_DMDEFAULTSOURCE, 7 (0x7)
234
198: XQXI_DMMEDIATYPE, 1 (0x1)
235
1a4: XQX_0x20000007, 1 (0x1)
236
1b0: XQXI_RESOLUTION_X, 600 (0x258)
237
1bc: XQXI_RESOLUTION_Y, 600 (0x258)
238
1c8: XQXI_RASTER_X, 9856 (0x2680)
239
1d4: XQXI_RASTER_Y, 6432 (0x1920)
240
1e0: XQXI_VIDEO_BPP, 2 (0x2)
241
1ec: XQXI_VIDEO_X, 4923 (0x133b)
242
1f8: XQXI_VIDEO_Y, 6432 (0x1920)
243
204: XQXI_ECONOMODE, 0 (0x0)
244
210: XQX_0x20000001, 1 (0x1)
245
21c: XQXI_END, 3735928559 (0xdeadbeef)
246
228: XQX_START_PLANE(5), 4 items
247
230: XQX_0x80000000, 64 (0x40)
248
23c: XQX_0x40000000, 0 (0x0)
249
248: XQXI_BIH(0x40000002)
250
DL = 0, D = 0, P = 1, - = 0, XY = 9856 x 6432
251
L0 = 128, MX = 16, MY = 0
252
Order = 3 ILEAVE SMID
253
Options = 92 LRLTWO TPDON TPBON DPON
254
51 stripes, 0 layers, 1 planes
256
264: XQXI_END, 3735928559 (0xdeadbeef)
257
270: XQX_JBIG(7), 110 items
258
2e6: XQX_END_PLANE(6), 0 items
259
2ee: XQX_END_PAGE(4), 0 items
260
2f6: XQX_END_DOC(2), 0 items
261
Total size: 110 bytes
262
0: \\033%-12345X@PJL EOJ
269
.BR /usr/bin/xqxdecode
271
.BR foo2xqx-wrapper (1),
274
Rick Richardson <rick.richardson@comcast.net>