Drop a .pcl or .prn file on the page and the explorer reads it with its PCL viewer. The same viewer reads PCL 5 and PCL 5c,
the HP-GL/2 inside them, PCL XL (PCL 6) streams, and the PJL around all of these.
The tabs
- Pages – every page the job prints, the first as a picture and each of the others behind a Show button, with its size, orientation and what is on it.
- Commands – one row for every command, control code, run of text, block of data and PJL line, in file order, with its offset, its name, its group and what its values mean. A combined escape sequence such as
Esc(s1p10h12v0s0b3Tis explained command by command. Click a row to select its bytes. - HP-GL/2 – every HP-GL/2 instruction inside the job, explained as in the HP-GL/2 reference.
- PCL XL – every PCL XL operator with its attributes named and its enumerations spelled out.
- Resources – every soft font the job downloads (header fields with their byte offsets, and a sheet of the characters), macros, user-defined patterns and PJL lines.
- Summary – the commands used, counted.
The structure tree has one node for each token, and each escape sequence opens into its commands and each command into its parameterised character, group character, value and termination character. A job’s HP-GL/2 data and PCL XL streams open into their instructions and operators. Problems are listed at the top with their byte offset, however many there are.
What is drawn as the printer would
- The logical page and the four orientations, the page sizes of the manuals’ tables, the margins, the cursor in rows, columns, decipoints and PCL units (with the unit of measure), control codes, line termination, perforation skip and page breaks, push and pop of the cursor.
- Rectangular area fills: solid black and white, user-defined patterns drawn from their downloaded data.
- Raster images at the stated resolution, decoded exactly from every compression method, in black and white, with simple colour and with the image configuration command (RGB and CMY).
- Downloaded bitmap fonts, exactly, and TrueType soft fonts as outlines.
- HP-GL/2 inside PCL: the picture frame, anchor point, plot size scaling, pen position handoff, clipping to the frame, vectors, polygons, fills, line types, labels and symbols.
- Macros: recorded, executed and called, and overlays at the start of every page.
What is approximated
- Built-in fonts. The printer’s Courier, Letter Gothic and the other internal fonts are not reproduced. Text is drawn with a stroke font of our own at the right size, position and advance (fixed pitch from the HMI, proportional from the stroke widths), in a heavier line for bold and slanted for italic. Only ASCII characters have shapes; other codes show as a box, and symbol sets are not applied.
- Shading and cross-hatch. The eight HP shading patterns are drawn dot by dot as the manual’s Figure 13-4 shows them (some are 16 by 16 dots), and the six cross-hatch patterns as the lines of Figure 13-5: 2 dots thick, 1/16 inch apart. One dot of a pattern is taken as one dot at 300 dpi.
- No anti-aliasing of vectors and text; images are averaged when shown smaller.
- Colour. Palettes are used as given; colour lookup tables, gamma, dither matrices, viewing illuminants and render algorithms do not change the picture; sRGB values are drawn as they are.
- Print model. In PCL 5, logical operations (ROP3) and the pattern transparency mode are applied to rectangular area fills and the logical operation and both transparency modes to raster images (with the current pattern taken as solid for rasters), by the manual’s four transparency cases. Characters (the character shape is the source; the white pixels of the character cell are not modelled) and HP-GL/2 marks take the logical operation and the pattern transparency too; the operation is one value for both languages, so
Esc*l#Osets what HP-GL/2 starts with andMCchanges it for what follows. For pen lines and hatch lines the viewer follows GhostPCL (pgdraw.c,hpgl_rop): only the operations 0, 160, 170, 240, 250 and 255 take effect and any other is drawn as 252; characters and polygon fills take every value. In PCL XL they are: ROP3 with the transparency modes on paths, scan lines, text and images (a stroke uses only the paint), with null brushes excluded as the manual says.
What is listed but not drawn
- Intellifont characters (the contours are not drawn; the font’s header and characters are listed).
- Done in round 3: display functions mode (
Esc Y: controls and escape sequences printed, CR executed as CR LF,Esc Zexecuted), two-byte text parsing (Esc&t#P21, 31, 38) and the vertical rotated text path (Esc&c-1T) for the full-width characters of a soft TrueType font. Not done: the printer’s own large fonts (such characters advance the cursor and draw nothing) and the status readback commands (nothing is read back from a file). - In PCL XL, drawn: JPEG, delta-row and run-length images, raster patterns (tiled in the pattern’s own basis, rotated with the page), scan-line regions, user-defined streams (executed, with the two positions of an error inside one), PassThrough (the data goes through the PCL 5 renderer onto the XL page), downloaded bitmap and TrueType fonts (angle, scale, shear, pseudo-bold, vertical substitution), exact clip paths including exterior regions and intersections, and every error of Appendix K the viewer can detect, reported as the printer would. Not drawn: the printer’s own fonts (the stroke font stands in), the halftone and dither matrix.
- Data in another language after
@PJL ENTER LANGUAGE(PostScript, PDF): the part is listed as another language.
When a file is read as PCL
.pcl files always open with this viewer, damaged ones with the missing signature reported as a problem. .prn is any
print-to-file output, so a file is read as PCL only when it starts with the Universal Exit Language, with Esc and a PCL command, with a PCL XL
header, or with @PJL and an ENTER LANGUAGE = PCL, PCLXL or PCL6 line; PostScript, text and ESC/P files are
left as bytes. A .plt file wrapped in a PCL job (Esc E Esc%0B IN; ...) opens here too; a plain HP-GL file opens in the
HP-GL viewer.