More printing from a specific paper tray

The Amyuni PDF Converter is our Printer Driver that enables you to convert any documents to PDF format. If you have any questions about installing and using the Amyuni PDF Converter please post them here.
Post Reply
avanderwoude
Posts: 11
Joined: Tue Apr 06 2004

More printing from a specific paper tray

Post by avanderwoude »

My printer is ignoring the paper tray settings that are (I assume) being burned into the PDF file. I have a Powerbuilder application where I create a PDF from a datawindow report. In that report I set the paper source to be (for example) 2, which indicates the 11x17 bin. This works okay if I simply print the report from PB. However, if I create a PDF and try to print that, the paper source setting appears to be ignored, and the printer just uses the default paper source.

Just to be clear: I'm using the PrintPDFDocument() method rather than PrintPDFDocumentEx() as there is no password.

This is related to a previous topic: http://www.amyuni.com/forum/viewtopic.php?t=771

What is the correct way to make sure that the PDF I have created is printed from a particular paper bin?
avanderwoude
Posts: 11
Joined: Tue Apr 06 2004

Post by avanderwoude »

Okay, I have spent a bunch more time playing around with this printing from a specific paper tray.

As an aside, note that the software I'm using is Powerbuilder. However, this topic has not been discussed (as far as I can see) in the Powerbuilder Community forum, so I'm posting in this forum. And anyway, I don't think that the problems I'm having are necessarily caused by Powerbuilder.

It seems that setting the datawindow's Paper.Source property does work to a certain extent. If I set the value to 4 (meaning Manual Feed) then the PDF that is generated does in fact prompt for a manual feed. This leads me to agree that the paper tray information is being stored in the PDF itself. However, when I try to set the paper tray to 2 (the 11x17 tray) then the printer ignores me and just prints from tray 1 (the 8.5x11 tray). So I downloaded a utility called PowerWhizz that inspects printers and reports on their characteristics. According to this utility my printer (a Xerox DocuPrint N32) uses the numbers 256 and 257 to represent its first and second trays respectively. So I tried 257, but this did not help -- it still printed from tray 1. Then I tried setting both the tray number and the paper size in the datawindow. Interestingly, since I specified a paper size of 4 (meaning 11x17 Ledger) the printout was in landscape mode, albeit still on 8.5x11 paper. I suspect that the paper size is not actually stored in the PDF, but the PDF is created in portrait or landscape mode in such a way as to accommodate the desired paper size.

So where does this leave me? There is a tantalizing possibility that the desired paper tray is stored in the PDF itself, since setting it to manual feed works. However, setting any other tray number does not appear to work, which means that I cannot ship my software. Can you offer any suggestions as to what to do next? For example, must I call the SetPrinterAttributes() method?

As a final note, why in the name of all that is holy do you store the paper source in the PDF? This is madness! The PDF should neither know nor care what tray is used to supply the paper, just like it does not care which printer the PDF is printed on. Instead, the PrintPDFDocument() method should allow you to specify the paper tray just like you can specify the printer and the number of copies, etc.
Post Reply