Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decode an HP -GL/2 string

Status
Not open for further replies.

webrabbit

MIS
Jan 31, 2003
1,059
US
While decoding a PCL file, I encountered the following string:

[esc] %BWUAC14,4SP1PP1PW0TD1IWSC0,1.6932,0,-1.6932,2RO0IR0,100,0,100

I know the [esc] %B means to enter HP-GL/2 mode. Does anyone know what the rest of it means?
 
HP PCL codes.

mmerlinn


Poor people do not hire employees. If you soak the rich, who are you going to work for?

"We've found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking and coding. Answering questions for careless and sloppy thinkers is not rewarding." - Eric Raymond
 
Brief analysis; it tells you what the commands are, but you'd still need the HP-GL/2 manual (part of the PCL5 Technical Reference manual) to decipher exactly what the parameters mean:

Code:
PCL Parameterised      <Esc>%B           Enter HP-GL/2 Mode: Pen = HP-GL/2
Comment                                  Switch language to HP-GL/2
HP-GL/2 Command        WU                Pen Width Unit Selection
HP-GL/2 Command        AC14,4            Anchor Corner
HP-GL/2 Command        SP1               Select Pen
HP-GL/2 Command        PP1               Pixel Placement
HP-GL/2 Command        PW0               Pen Width
HP-GL/2 Command        TD1               Transparent Data
Comment                                  Label transparency is now Set
HP-GL/2 Command        IW                Input Window
HP-GL/2 Command        SC0,1.6932,0,-1.  
                         6932,2          Scale
HP-GL/2 Command        RO0               Rotate Coordinate System
HP-GL/2 Command        IR0,100,0,100     Input Relative P1 and P2
Comment                                  Previous sequence not terminated by semi-colon

You can do this analysis yourself, using the PRN File Analyse tool in the free PCL Paraphernalia application, available via
Having said that, your code snippet revealed a bug in the tool, so I had to add in a few PCL sequences at the end to get it to describe the last HP-GL/2 command correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top