Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

PCL commands *g12W and *o5W

PCL commands *g12W and *o5W

PCL commands *g12W and *o5W

Hi all,

I am working on a PCL decoder.

I have installed a HP Designjet 130 printer on my system which uses printer language PCL 3-GUI RGB 24-bit Contone.I take a bmp and do a print-to-file.My aim is to decode the PCL commands in this output file.I am getting stuck in decoding the commands *g12W and *o5W.I have read a lot but could not find the interpretation of these 2 specific commands.

Can somebody please help me out.

Thanks and Regards

RE: PCL commands *g12W and *o5W

{esc}*g#W is the Configure Raster Data command; it must be followed by # bytes of configuration data, the format of which appears to vary from printer to printer; it seems to be used to set things like colour depth, horizontal and vertical resolution, etc.

{esc}*o#W is the Configure Driver command; it must be followed by # bytes of configuration data, the format of which also appears to vary from printer to printer; I'm not sure, but I think this is used to effectively add new 'printer-specific' instructions to different printers, the detail being in the (printer-specific) configuration data.

RE: PCL commands *g12W and *o5W

thanx DansDadUK.You are right that the configure raster data command is used to set in horizontal and vertical resolutions of the components and also their intensity levels.My understanding says that this command is used in those printers which support asymmetric resolution(e.g.600x300).This command has different forms depending on the format byte which is always the first byte of the configuration data.Correct me if I am wrong.

e.g.*g26W[02 04 02 58 02 58 00 02......] means there is 26 bytes of configuration data.The first byte always stands for the format number,hence in this case the format number is 2[02].In "Format 2" the second byte[04] stands for the number of components ,the third and fourth bytes for the horizontal resolution of the first component,the fifth and sixth for the vertical resolution of the first component and so on.Now the values that these bytes store varies from printer to printer but the meaning of each byte is decided by the format number.

Now what I am getting is *g12W[06 1F 00 01 01 2C 01 2C 0A 01 20 01].The first byte is [06] which is the format number.Now I do not know this format and hence am not able to interpret the following 11 bytes of data.Without knowing the resolution (which is embed in this byte stream)it shall not be possible for me to recreate the bmp in my decoder and hence I cannot even ignore this command.
Any suggestions !!


RE: PCL commands *g12W and *o5W


I don't have any information on Format 6, sorry.

It is presumably something which has been created for the newer generation of DeskJet devices (and perhaps even Colour LaserJet?)

Just what is your 'decoder' attempting to do? Is it effectively a PCL Viewer (like SwiftView), or what?
If it is, perhaps you could obtain clues by running your data through SwiftView (or other) viewer?


RE: PCL commands *g12W and *o5W

I think you could be pretty confident the the resolution is the 01 2C (300 dpi).

Jim Asman

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close