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

PCL 5e Print Direction command not working on HP

Status
Not open for further replies.

cjoyce

Programmer
May 12, 2003
5
US
I have a Lexmark T522, HP 4100 and HP 4200. In an attempt to print a page upside down, I use the Print Direction command. It is working properly on the Lexmark but neither of the HPs. Here is the syntax:

\x1b&a180P

Any ideas on how to debug this? Thanks.
 
If you want to print a whole page upside down,
why not just print in reverse orientation.

<esc>&l2O for reverse portrait
<esc>&l3O for reverse landscape

But to get back to your question, you haven't said what "not working" means. I assume that \x1b is just your representation of the <esc> for this message and the real <esc> is sent to the printer.

Otherwise, make sure you have some PCL positioning commands in that data to make sure the CAP hasn't been rotated off the page.



Jim Asman
jlasman@telus.net
 
Jim,

Thanks for the reply. I forgot to mention that the page prints right-side-up instead of upside down on the HP. I haven't tried reverse orientation before. Yes, I'm sending <esc>&a180P - hex 1b is <esc> and I'm pretty sure I have positioning commands in the beginning of my PCL buffer but I will check.

Regards,
Chris
 
Try something like this...

<esc>&a0PThis is rightside up<esc>&a180PThis is upside down

See if that behaves as expected.

Have you sent the identical file to the Lexmark and HP's.

I have never had any issues with text rotation that weren't pilot error.


Jim Asman
jlasman@telus.net
 
Thinking about this, my best guess would be that there is something wrong with your rotate command as it arrives at the printer OR something else is resetting the printer after you issue the command.

Jim Asman
jlasman@telus.net
 
Try Esc&a90PHelloEsc&a0P
and see if it prints from bottom to top. That is text going
up the page.
 
Try the following:
Code:
<Esc>&a0P              Print Direction: 0 degree rotation
<Esc>&a810v            Cursor Position (decipoints): Vertical
       579H            Cursor Position (decipoints): Horizontal
<Esc>&a0P              Print Direction: 0 degree rotation
Rotation = 0°          Data
<Esc>&a2160v           Cursor Position (decipoints): Vertical
       669H            Cursor Position (decipoints): Horizontal
<Esc>&a90P             Print Direction: 90 degree ccw rotation
Rotation = 90° ccw     Data
<Esc>&a0P              Print Direction: 0 degree rotation
<Esc>&a2070v           Cursor Position (decipoints): Vertical
       2019H           Cursor Position (decipoints): Horizontal
<Esc>&a180P            Print Direction: 180 degree ccw rotation
Rotation = 180° ccw    Data
<Esc>&a0P              Print Direction: 0 degree rotation
<Esc>&a720v            Cursor Position (decipoints): Vertical
       1929H           Cursor Position (decipoints): Horizontal
<Esc>&a270P            Print Direction: 270 degree ccw rotation
Rotation = 270° ccw    Data
<Esc>&a0P              Print Direction: 0 degree rotation
where left side shows the sequences/data, and right side shows the interpretation.

It should print the embedded data strings, in whatever is the current font, around the edges of a 2" square, with the top-left corner of the square being 1" from the top and left edges of the paper.

Note that print direction is set back to 0 before each positioning sequence; this is to avoid having to cater for the fact that the coordinate system is rotated when the print direction is changed.
 
Thanks guys for the prompt response. I had completely overlooked reverse portrait/landscape in my .NET PCL component when I implemented the PCL 5e spec so I just grabbed the first command that produced the desired output (which was Print Direction).

Using reverse portrait orientation rather than the print direction command solved my problem. I was sending the same PCL buffer to both the Lexmark and the HP before so maybe it was an issue with the margins.

Regards,
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top