×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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!
  • Students Click Here

*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

Jobs

Combined command w/ data
2

Combined command w/ data

Combined command w/ data

(OP)
I was wondering if some printers allow PCL commands with data to be combined. For example could the following

   Ec *r1A
   Ec *b0M
   Ec *b2M__
   Ec *b2M__
   Ec *rC

Be written as

   Ec *r1A
   Ec *b0M
   Ec *b2m2M____
   Ec *rC

I wasn't sure if the printer would read the first two bytes of data following the terminator and associate it with the first command and then read the last two bytes of data and associate it with the second command.

I tried simulating this with a small 4x4 image using a PCL viewer. The viewer ignored the binary data that followed the terminator. Is this behavior that I should expect with most/all printers?

If so what other scenarios will prevent a PCL command from being combined (provided the commands meet the three defined rules written in the specification).
 

RE: Combined command w/ data

Your sample, of the format:

<esc>*b2m2Mpqrs

where 'pq' and 'rs' are the two sets of 2-byte binary data values required, is NOT valid.

The correct format, according to the syntax rules, would be:

<esc>*b2mpq2Mrs

Early LaserJet devices did not support the use of binary data associated with the 'not last' (I sure there is a better way of expressing that!) parts of combination sequences, so that (syntactically-valid) format would not be interpreted correctly.

I suspect that modern devices DO support this, but I don't know for certain.

RE: Combined command w/ data

But, but, but...

the b2m part is the compression scheme, NOT the byte count.

so <esc>*b2m2Wpq<esc>*b2Wrs would be the correct sequence.

You don't have to repeat the compression sequence if it hasn't changed since the last sequence.
 

Jim Asman
http://www.spectracolorservices.com

RE: Combined command w/ data

Jim

You are quite right (as usual)!

I lazily assumed, without checking (given the context in the question), that the sequence (<esc>*b#M) was one where # defined the length of the following binary data, and that the question was about whether you could have binary data associated with more than one element of a combination sequence.

i.e. something like (using your suggested 'Transfer Raster Data by Row/Block' sequence):

<esc>*b3wxxx5Wyyyyy

where 'xxx' and 'yyyyy' represent, respectively, 3-byte and 5-byte binary sequences.

This is (theoretically) valid PCL, although the format wasn't supported by the older LaserJet printers; it may or may not be supported by modern LaserJet devices (I'm not sure).


Chris

RE: Combined command w/ data

OK, just to wrap this up.

I made a pcl file without compression. Then I made a second file by editing the first one doing some gloabal deletes and replaces so we have a correct abbreviated file as proposed.

The result...

Both files display perfectly using Swiftview.

However, the edited version of the file resulted in garbage when directed to each of my 3 different PCL5 printers...
LJ4+, LJ5000, and DJ2280
 

Jim Asman
http://www.spectracolorservices.com

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