home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
printer
/
showpcl.arc
/
READ.ME
< prev
next >
Wrap
Text File
|
1990-02-18
|
10KB
|
218 lines
┌───────────────────────────────────┬──────────────────────────────────┐
│SHOWPCL.EXE - analyse HP-PCL-Files │ Ver 1.4, W. Strobl, Bonn 90/02/14│
└───────────────────────────────────┴──────────────────────────────────┘
╔══════════════════════════════════════════════════╗
║ Usage: ║
║ showpcl [-f] [-b] [-a] INPUTFILE ║
║ ║
║ -f do not analyse font headers (softfonts) ║
║ -b dump binary data (i.e. graphics, ║
║ font headers) ║
║ -a do not use ANSI escape sequences ║
║ (useful for output redirection and on ║
║ monochrome screens) ║
║ ║
║ Output goes to standard output ║
╚══════════════════════════════════════════════════╝
Background and Purpose
----------------------
PCL is a family of printer command languages (coded as escape sequences)
designed by Hewlett Packard for control of their printers. It is a
successful compromise between device independence and interpretation
efficiency.
SHOWPCL interprets this PCL data and displays it in three columns. The
following is a sample output:
┌────────────────────────────────┬───────────────┬──────────────────────┐
│ Operation │ Operand│Text data │
├────────────────────────────────┼───────────────┼──────────────────────┤
│ │ │ │
│ Reset │ │ │
│ Number of Copies │ 1│ │
│ Portrait │ │ │
│ Page Length (Lines) │ 70│ │
│ Lines Per Inch │ 4│ │
│ Top Margin │ 1│ │
│ Text Length │ 45│ │
│ Feed from Tray │ │ │
│ Primary │ │ │
│ Symbol Set │ ISO 6: ASCII│ │
│ Primary │ │ │
│ Typeface Helv │ │ │
│ Stroke Weight │ 1│ │
│ Style Upright │ │ │
│ Point Size │ 14.40│ │
│ Proportional Spacing │ │ │
│ Position to Row (dezipoints) │ 677│ │
│Position to Column (dezipoints) │ 804│Dies │
│Position to Column (dezipoints) │ +63│ist │
│Position to Column (dezipoints) │ +62│ein │
│Position to Column (dezipoints) │ +63│Scheit, │
│... │ │ │
└────────────────────────────────┴───────────────┴──────────────────────┘
is the result of applying SHOWPCL to the this data:
0000 1B 45 1B 26 6C 31 58 1B 26 6C 30 6F 37 30 70 34 *.E.&l1X.&l0o70p4*
0010 64 31 65 34 35 46 1B 26 6C 31 48 1B 28 30 55 1B *d1e45F.&l1H.(0U.*
0020 28 73 34 74 31 62 30 73 31 34 2E 34 30 76 31 50 *(s4t1b0s14.40v1P*
0030 1B 26 61 36 37 37 56 1B 26 61 38 30 34 48 44 69 *.&a677V.&a804HDi*
0040 65 73 20 1B 26 61 2B 36 33 48 69 73 74 20 1B 26 *es .&a+63Hist .&*
0050 61 2B 36 32 48 65 69 6E 20 1B 26 61 2B 36 33 48 *a+62Hein .&a+63H*
0060 53 63 68 65 69 74 2C 20 1B 26 61 2B 36 32 48 65 *Scheit, .&a+62He*
...
What SHOWPCL does
-----------------
SHOWPCL understands most PCL escape sequences: printer control,
graphics, soft fonts. It takes one argument, the file name of the file
that contains the data sent to a PCL printer. It disassembles that
data and sends its interpretation to the standard output, normally to
the PC screen. The output is (roughly) separated into three colums:
column one contains the verbose description of an operation. Column
two shows the operand of this operation. Column three is used for
uninterpreted text data, if there is any. All three columns have
different colors, if this isn't disabled with the -a flag.
Some kind of data (which is recognized by looking at the operations) is
dumped in classic dump format, if requested by the -b flag. This
applies to graphic data. It applies to font headers, too, of their
interpretation is inhibited by the -f flag.
So
┌──────────────────────────────────────────┐
│showpcl bla.prn │
└──────────────────────────────────────────┘
shows everything but graphics data.
┌──────────────────────────────────────────┐
│showpcl -b bla.prn │
└──────────────────────────────────────────┘
shows the graphics data, too.
┌──────────────────────────────────────────┐
│showpcl -f bla.prn │
└──────────────────────────────────────────┘
doesn't interpret any soft font headers, it tells about their
existence only.
┌──────────────────────────────────────────┐
│showpcl -b -f bla.prn │
└──────────────────────────────────────────┘
dump's graphics data and uninterpreted font headers, if there
are any.
┌──────────────────────────────────────────┐
│showpcl -a -b -f bla.prn │
└──────────────────────────────────────────┘
does this without inserting ANSI escape sequences, which is
especially useful if you use this in the form
┌──────────────────────────────────────────┐
│showpcl -a bla.prn > bla.dmp │
└──────────────────────────────────────────┘
or
┌──────────────────────────────────────────┐
│showpcl -a bla.prn | list /s │
└──────────────────────────────────────────┘
The last example assumes that you have Vernon Buerg's LIST somewhere
in your path. A batch procedure containing
╔═══════════════════════════════LISTPCL.BAT╗
║ @echo off ║
║ showpcl -a %1 %2 %3 | list /s ║
╚══════════════════════════════════════════╝
is supplied within the SHOWPCL archive under the name LISTPCL.BAT.
It acts as a simple browser for PCL files.
What SHOWPCL doesn't
--------------------
There should be an option to have a fourth column displaying the
input data (like the first column of assemblers/disassemblers). There
should be a builtin browsing capability, i.e. the ability to scroll
forward and backward. A display of the current byte position
in the input data would be nice.
Like real PCL printers SHOWPCL is not very good if you try to bug it
with faulty PCL files. It is a tool to look at usable PCL files, in
order to understand what is going on. At the current time it is not
intended as a fail-safe tool to debug faulty PCL files.
The disassembler itself may contain bugs; I haven't tested it much.
It's main purpose is to look at big PCL files in order understand what
is going on, in order to see quickly what the author of the printer
driver which produced the output was trying to do. In doubt check your
data manually. Please report any bugs or interpretation errors to
me, via Email (STROBL@DBNGMD21.BITNET).
History
-------
SHOWPCL was written shortly after I got a DeskJet Plus for my office
and purchased another one for use at home. After staring at some printer
outputs made for LaserJet's and checking them against my DeskJet manual
I thougth that it was time for yet another tool: a PCL disassembler.
I started with two manuals: a copy of a HP-LaserJet Technical Reference
Manual and my own DeskJet manual. My intention was to create a tool
which could discriminate between the different PCL variants, by
displaying them in different colors. After checking the two manuals I
discovered that
- LaserJet Softfonts and DeskJet Softfonts are different
- the LaserJet Technical Reference Manual has a softfont
description
- the DeskJet manual has no softfont description
- there was no Deskjet Technical Reference Manual (at that time)
Therefore I changed my approach and did a LaserJet PCL disassembler
first, adding DeskJet softfonts later.
While programming and using this disassembler I tried to acquire more
information about the DeskJet. HP was very helpful and sent me a copy
of their DeskJet Software Developer's Guide. Beside other things I
used it to add DeskJet Softfont interpretation to the disassembler.
Still missing is the interpretation of a few DeskJet specific escape
sequences.
In fact, the actual use of this tool was not so much debugging of
my own DeskJet data, but helping some of my colleagues debugging
their LaserJet driver's output.
Status
------
I donate this program to the public domain. There are no
warranties. Use this program at your own risk.
Wolfgang Strobl, 18. Februar 1990, Bonn, FRG.