×
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

specify tray in PCL file

specify tray in PCL file

specify tray in PCL file

(OP)
We will be generating PCL files made by an HP Laser Jet 4 driver.

We need to print these files later by using copy or LPR command line utilities, but we need to specify the tray.

If I try to insert the escape command for a different tray anywhere in the header shown below, it will print from that tray but everything will be garbled.

How can I programmatically specify the tray?


<actual file snippet>

E&l0A&l0s0O&k0G(8U(s10.00h12.00v0p0s0b3TE&l0O&a0P&l1C&l0008E&l001C&l0512F&a0R&l008C&l02A&l1C&l0008E&l001C&l0512F&a0R&l008C&l0S*c1d4F)s213W @      '    x –                          GOTHIC                  PMFUSER  


<disassembled file with dumppcl.exe>

; Disassembly of <g:\split2.prn>
<Esc>E        Reset
<Esc>&l0A    Page size = 0
<Esc>&l0s    Simplex print
0O        Portrait
<Esc>&k0G    CR -> CR, LF -> LF, FF -> FF
<Esc>(8U    Primary symbol set =  Roman8
<Esc>(s10.00h    Primary font pitch = 10.00 chars per inch
12.00v        Primary font height = 12.00 1/72 inch
0p        Primary font spacing, fixed
0s        Primary font style = Upright, solid
0b        Primary font stroke weight = 0
3T        Primary typeface = Courier
<Esc>E        Reset
<Esc>&l0O    Portrait
<Esc>&a0P    Print rotation 0 (degrees, counterclockwise)
<Esc>&l1C    Vertical motion index = 1 1/48 inch
<Esc>&l0008E    Top margin = 0008 lines
<Esc>&l001C    Vertical motion index = 001 1/48 inch
<Esc>&l0512F    Text length = 0512 lines
<Esc>&a0R    Vertical position = 0 rows
<Esc>&l008C    Vertical motion index = 008 1/48 inch
<Esc>&l02A    Page size = 02
<Esc>&l1C    Vertical motion index = 1 1/48 inch
<Esc>&l0008E    Top margin = 0008 lines
<Esc>&l001C    Vertical motion index = 001 1/48 inch
<Esc>&l0512F    Text length = 0512 lines
<Esc>&a0R    Vertical position = 0 rows
<Esc>&l008C    Vertical motion index = 008 1/48 inch
<Esc>&l0S    Simplex print
<Esc>*c1d    Assign font ID = 1
4F        Make soft font temporary (last ID specified)
<Esc>)s213W    Download soft font header descriptor of 213 bytes
      0  1  2  3  4  5  6  7 -  8  9  A  B  C  D  E  F   0123456789ABCDEF
0000 00 40 00 02 00 00 00 1E - 00 1A 00 27 00 01 00 20   .@.......'..
0010 00 78 00 96 00 00 00 00 - 03 00 00 00 00 00 20 02   .x.–......... 
0020 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00   ................
0030 47 4F 54 48 49 43 20 20 - 20 20 20 20 20 20 20 20   GOTHIC          
0040 20 20 20 20 20 20 20 20 - 50 4D 46 55 53 45 52 20           PMFUSER
0050 20 31 39 39 32 2F 30 37 - 2F 31 34 20 31 32 3A 31    1992/07/14 12:1
0060 37 20 43 30 44 30 47 42 - 31 32 20 31 39 39 32 2F   7 C0D0GB12 1992/
0070 30 37 2F 31 33 20 31 35 - 3A 30 36 20 43 31 44 30   07/13 15:06 C1D0
0080 47 42 31 32 20 20 20 20 - 20 20 20 20 20 20 20 20   GB12            
0090 20 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 20                   
00A0 20 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 20                   
00B0 20 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 20                   
00C0 20 20 20 20 20 20 20 20 - 20 20 20 20 20 20 20 20                   
00D0 20 20 20 20 20          -                                
<Esc>*c129E    Soft font character code = 129
<Esc>(s8..............

RE: specify tray in PCL file

As long as the tray select command arrives at the printer before any printable data, it should work just fine. There must be some explanation of why the data is being corrupted.

What do you mean by garbled? You would have to be careful that your command wasn't in the middle of a font or image download. One thought, how are you inserting the tray command? Are you on UNIX? Maybe your editing process is corrupting the file. The VI editor will strip 0x00 chars from the file. Not a problem on a text file, but devastating to binary data such as a font.

Usually the biggest worry when specifying a tray is what will happen if that specific tray is empty and there is another with a suitably sized paper.

Jim Asman
http://www.spectracolorservices.com

RE: specify tray in PCL file

(OP)
That must be the problem- I was using Notepad, I'll try it in binary mode.

You sound like someone who could shed some light on my next PCL question, how to make a PCL pagesplitter, which I'll post separately from this...

Thanks

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