An Oracle blog about BI Publisher

Alternate Tray Printing

Since we introduced support for check printing PCL escape sequences in i.e. being able to set the micr font or change the print cartridge to the magnetic ink for that string. I have wanted to test out other PCL commands, particularly, changing print trays. Say you have letter headed paper or pre-printed or colored paper in tray 2 but only want to use it for the first page or specific or for a separator page, the rest can come out of plain ol Tray 1 with its copier paper.

I have had a couple of inquiries recently and so, I finally took some time to test out the theory. I should add here, that the dev team thought it would work but were not 100%. The feature was built for the check printing requirements alone so they could not support any other commands. I was hopeful thou!
In short, it works!

I can generate a document and print it with embedded PCL commands to change from Tray 1 (&l4H) to Tray 2 (&l1H ) - yep, makes no sense to me either. I got the codes from here, useful site with a host of other possibilities to test.

For the test, I just created a department-employee listing that broke the page when the department changed. Just inside the first grouping loop I included the PCL string to set Tray 1.

<pcl><control><esc/>&l4H </control> </pcl>

Note, this has to be in clear text, you can not use a formfield.
I then created a dummy insert page using a template and called it from just within the closing department group field (InsertPAGE field.) At the beginning of the dummy page I included the PCL string to get the paper from Tray 2:

<pcl><control><esc/>&l1H</control> </pcl>

When you run this to PDF you will see the PCL string. I played with this and hid it using a white font and it worked great, assuming you have white paper :)

When you set up the printer in the BIP admin console, you need to ensure you have picked the 'PDF to PCL Filter' for the printer.

If you dont want to have PCL enabled all the time, you can have multiple definitions for the same printer with/with out the PCL filter. Users just need to pick the appropriate printer instance. Using this filter ensures that those PCL strings will be preserved into the final PCL that gets sent to the printer.

Example files here. Official documentation on the PCL string here.

Happy Printing!

Join the discussion

Comments ( 2 )
  • guest Friday, February 21, 2014

    Hi Tim,

    thank you for that post. Is it possible to use any other PDF2PCL-Converter or Java-Classes instead of the BI Publisher Filter, because we need to create the final PDF document through the bookbinder API.

    ciao Stephan

  • Tim Friday, February 21, 2014

    Hi Stephan

    I would need to check if BIPs PDF2PCL does anything special with the esc codes. I believe it does but will double check.

    Because the regular PDF generation preserves the esc codes; for a bookbinding process just leave them as PDFs. Bind them and then you can use the BIP PDF2PCL class to do the conversion for printing. (You need the details on that I know)

    Alternatively, you could potentially upload the bound pdf as a template and some dummy data and let the server 'generate' the document again ie do nothing and then let the server send the print job.



Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha