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!

different trays for different pages

Status
Not open for further replies.

cruicu

Technical User
Nov 25, 2002
24
RO
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.
 
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
jlasman@telus.net
 
If you need the PCL 5 command to select the trays it is:

Ec&l#H

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.
 
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?
 
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
jlasman@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top