[reportlab-users] OT: Batch-Printing PDFs on MS Windows and Duplex mode

Henning von Bargen H.vonBargen at t-p.com
Wed Aug 24 04:47:23 EDT 2005


This is slightly off-topic, on the other hand the topic
may be essential to a great part of the RL users.
I'd like to share some experience and maybe get a clue
for a very specific printing problem.

First of all, the printing problem:
Using Ghostscript to print a PDF file to a HP Color LaserJet 4600
printer with the pswrite device, the printer always prints in
Duplex mode, which we did not want and did not specify in any way
(and the printing fails anyway because the printer produces paper jam
when trying to turn the paper).

I hope someone on this list can give me a clue how to explicitely
tell GS/the printer that I don't want duplex printing.

Now our experiences:

In our application, we are producing PDF files in several ways
(RL is one of them, but we're using Oracle Reports as well).

The task is to print these files on different printers in
a MS Windows environment without user-interaction
(in fact we are using a Windows Service).

To implement the essential task of printing one PDF file to a printer
(not the default printer), we tried several ways:

- Using command line options or DDE to control Adobe Reader 7
- Controlling the user interface of Adobe Reader 7
- Several programs we found in the internet that were so bad
  that it is better to not mention them
- pdprint from www.pdf-tools.ch
- GPL Ghostscript 8.15

Each of them has its pros and cons:

- Unfortunately Adobe seems to decrease support for useful
  command line or DDE options with each new version of AR.
  We found that they were not working reliable enough
  (files stay open and locked, sometimes output gets lost).

- Controlling the Adobe Reader UI worked reliable, but
  it is very clumsy and depends on the language and version of AR.

- pdprint works very well and very fast, but it is quite expensive.

- GPL Ghostscript 8.15 has some bugs handling TrueType fonts
  and in the PXL (=PCL6) devices and for landscape PDF files.

We finally decided to use Ghostscript, because it is working
rock-solid and we could work around the TT font problems and 
the landscape problems.
The PXL problems are gone in AFPL Ghostscript 8.51 (which we don't
use, however), but we probably do not need that device.

We have some knowledge of the printing environment by making use
of the wonderful win32print API, and based on this information
(Printer name and driver name), we are using some logic to choose 
one of the GS devices.
For HP LaserJet printers, the logic chooses the pswrite device;
except for some cheaper/older printers that do not understand 
Postscript - the ljet4 device is selected for those.
For other printers, the logic chooses either the pswrite, pxlcolor 
or mswinpr2 device.
The mswinpr2 device works for printers that do neither understand 
neither PS nor PCL, but it is very slow (because internally, the page
is rastered with the max PDI the printer supports).

Unfortunately, AFAIK the hpijs or gimp-print IJS devices do not 
work in MS Windows environments.

How do other users handle batch-printing PDFs on MS Windows?

Henning

P.S. Please excuse my bad English, I can never remember if it
should be "reliable" or "reliably"...


More information about the reportlab-users mailing list