Highlighted
Absent Member.
Absent Member.
1271 views

PCL advancing print line when after 0 used

i have searched for this to be covered but did not see anything covering this specific error/issue so I decided to post a new question on it.

We store printer pcl codes in a file then reference those and send each to the printer directly but when we do this even though we code for no advancing it is moving us down a line for each code.  This was not really noticed until we moved from Unix to Winodws servers and had to add PCL code to do tray selection.  While the tray selection works fine, if we are doing things like check or form printing the first page is starting in a different spot on the page than the additional pages.

We are using direct prining:

-Q HP 4000;DIRECT=ON

To swap trays in this case we send

027 038 108 053 072 (ESC & I 5 H)

In the program we simply use a write after moving that line to the print area:

      move wscap-item(37) to printer-record
      write printer-record after zero

...this works perfectly except we are hoping this would not advance at all but it is moving the print down one line.  Our first print can optionally set font size, initialization codes and tray printing which would move our print for the first page down 3 lines.

Thanks in advnace for any assistance, Mike

0 Likes
1 Reply
Highlighted
Visitor.

RE: PCL advancing print line when after 0 used

My guess is that your problem is not with print after zero, but how you retrieve your stored PCL code.  Check to see if your retrieved PCL code has an embedded CR/LF at the end.  To test, you could hard code the tray selection in your program, and see if your problem goes away.

Dale

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.