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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lowercase Terminator 2

Status
Not open for further replies.

srwatson

Programmer
Dec 13, 2011
16
CA
I printed a PDF to a file using the HP Color LaserJet 4550 PCL 5 printer driver. When I took a look at the output PCL file I noticed it had the following commands.

Ec *r0F
Ec &l0o
Ec &12A

I wasn't sure if the printer would just ignore the command with the lowercase terminator. So I tried printing the following commands to a Kyocera FS-4020DN and a SHARP MX-M503N the output from these two printers looked fine.

Ec*p400xEc*p2500yEc&a90pEc(s0SI'm 90 degrees

According to the PCL specification a terminator is "Any character from the ASCII table within the range 64-94 decimal (\ @ " through \ ^ "). This character specifies the parameter to which the previous value field applies. This character terminates the escape sequence".

I was wondering if someone could explain why the two printers and PCL Viewer I'm using interprets these invalid commands correctly.

~ Thanks
 
Or I guess the better question would be why is the HP driver not following the HP specification for PCL command structure?
 
The upper case terminator is only needed to separate PCL commands from following data. As the esc caracter cannot be data, (unless the preceding command is normally followd by binary data), the esc caracter causes the previous lower-case letter to effectively terminate the command.

I would say that is is a logical interpretation and raising an error would be nit-picking.
 
I agree with the explanation by webrabbit, and would just add the following comments:

(a) With a 'combination' sequence (where all parts have the same root (present only at the start of the combination sequence), and all but the last part having a lower-case Parameter character, each part will presumably be interpreted/actioned separately.

(b) So the 'set orientation' command will be recognised and actioned.

(c) The interpreter will then attempt to find the next part (terminated by a lower-case Parameter character, or an upper-case Termination character).

(d) Failing that (as pointed out by webrabbit), the Escape character indicates the start of a new escape sequence.

(e) I've noticed that standard Microsoft-provided drivers have been generating such (theoretically invalid) 'set orientation' sequences for several years now (going back to Windows XP, but still wrong with some Windows 7 drivers).
But I've no idea how to report such errors without being asked to pay for a 'support ticket'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top