Contact US

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!

*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

different trays for different pages

different trays for different pages

different trays for different pages

I have a PCL file with 10 000 invoices inside and I want to print this file with Hitachi Printer in a particular manner.
I can not  preview all of them and I don't want that. This action need more time.
I need something to tell the printer: when receive first page of first
invoice select tray 1, when receive page 2 select tray 2 and so on until
receive the last page of  first invoice, when receive the last page of
first invoice select another tray (for example tray 3, or HCF).  At the
second invoice (with different number of pages than first invoice)
things are reiterated again, and so on for next invoices until 10 000.
Every invoice has a different number of pages and all this invoices are
in this big PCL file.
When I print this big file, this is a single job.
How can I do for print this file in this particular manner?
Any suggestion will be appreciated.
Thank you.

RE: different trays for different pages

The program that generates the invoices will have to keep track of the page numbers and insert the PCL code to select the appropriate tray as the very first thing on the new page. I don't know of any built in PCL solution.

If you don't have the flexibility in your application to do the job, you could print to a file and possibly write a filter of some kind that would insert the proper codes into the invoice file. Conceptually it is not difficult.

Jim Asman

Jim Asman

RE: different trays for different pages

If you need the PCL 5 command to select the trays it is:


Replace the # with 1 to 9 to select diffrent trays. The default common tray numbers for HP printers are...

Tray 1: 8
Tray 2/Paper Cassette: 1
Tray 3: 4
Manual Paper Feed: 2
Optional 2000/5000 Tray: 5

Now these numbers might not work for your printer so try diffrent ones if they dont.

RE: different trays for different pages

Thank you for help.
But I don't have an aplication that generates this invoices.
This aplication is at customer site.
I only must to analyse this PCL file and solve the problem with trays.I don't know very much about PCL.
Now I try to learn more about PCL file and I count on this Forum.
Can somebody say where from can I get an apllication soft what can generates PCL files (only for tests)?
Wat is XSL?

RE: different trays for different pages

Depending on how the page breaks are handled by the application, it could be a relatively simple task to write a filter to insert the appropriate tray select codes. If the invoice pages are a fixed length in bytes or lines, you can probably find the invoice number and page end with ease.

On the other hand, if the print data is somewhat random in the file and you have to extract the needed information from context, then it could be a more daunting task.

Chances are the invoice numbe is either at a fixed character position on its line or is preceded by a PCL positioning code which you could search for. The page breaks will either be created directly with a FF or rely upon the number of linefeeds to the next page break.

Jim Asman

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