[reportlab-users] Re: printing from python (Henning von Bargen)

Bob Marshall bob.marshall at fallingblossoms.com
Wed Dec 14 14:36:19 EST 2005


Hi Folks,
   Another potential solution (our preference) is to convert the PDF to 
PostScript using pdftops from the xpdf tool 
(http://www.foolabs.com/xpdf/about.html) and then ftp the resulting PS 
file to the printer (network-attached in our case). This has the added 
advantage (for us) that we get to post-process the PS file to insert 
paper-tray selection commands to print to multiple paper types within a 
single print job. Cool!

   BTW Adobe Reader drives us crazy with its printing-related flakiness 
and continually changing APIs...

Cheers
Bob Marshall



Date: Wed, 14 Dec 2005 09:12:18 +0100
From: "Henning von Bargen" <H.vonBargen at t-p.com>
Subject: [reportlab-users] Re: printing from python
To: <reportlab-users at reportlab.com>
Message-ID:
	<77A9E75DA75C564D82BDC4B18A7D8525024FE1 at ROHRPOSTIX.tup.ads>
Content-Type: text/plain;	charset="iso-8859-1"
reportlab-users-request at reportlab.com wrote:

> Message: 2
> Date: Wed, 14 Dec 2005 09:12:18 +0100
> From: "Henning von Bargen" <H.vonBargen at t-p.com>
> Subject: [reportlab-users] Re: printing from python
> To: <reportlab-users at reportlab.com>
> Message-ID:
> 	<77A9E75DA75C564D82BDC4B18A7D8525024FE1 at ROHRPOSTIX.tup.ads>
> Content-Type: text/plain;	charset="iso-8859-1"
> 
> 
>>Message: 1
>>Date: Mon, 12 Dec 2005 21:54:51 -0500
>>From: "David Pannell" <dcpx2 at msn.com>
>>Subject: [reportlab-users] printing from python
>>To: reportlab-users at reportlab.com
>>Message-ID: <BAY115-F31C2667F694DB5B3074587F8390 at phx.gbl>
>>Content-Type: text/plain; format=flowed
>>
>>I'm an amateur who is developing some small database software 
>>for a small 
>>business.  Love reportlab.  One question, and this is driving 
>>me crazy, "How 
>>can I print the pdf I have generated without manually opening 
>>adobe and 
>>pressing print?"  I want to generate the pdf, print it from 
>>my python app 
>>and be done.  Please help.  I'm going crazier than usual.  
>>Thanks so much
>>
>>david
>>
>>There are some WIN32 specific ideas documented nicely at this site:
>>http://tgolden.sc.sabren.com/python/win32_how_do_i/print.html
>>
>>Hope they are usefull
>>
>>Mark Doukidis
> 
> 
> Printing PDFs on MS Windows is not as easy as it seems.
> We found ShellExecute not to be reliable with Adobe Reader:
> sometimes output gets lost, and the Adobe Reader window
> stays open.
> And the support for DDE and/or COM is shrinking with each
> new revision of Adobe Reader.
> 
> For our own application, we evaluated four possible solutions.
> a) controlling the Adobe Reader user interface.
> b) using GhostScript
> c) using a commercial tool (pdprint from www.pdf-tools.ch)
> d) ShellExecute with Adobe Reader
> 
> All of these have their pros and cons.
> a) In our tests, we found it works reliable (to our surprise).
> But it depends on the exact AR version and language you are using,
> and we just don't trust it really.
> b) GhostScript is the "standard" solution.
> But GPL GhostScript still has quite a bunch of flaws that make
> using it complicated, namely images on PCL printers,
> landscape on the mswinpr2 device, print speed on mswinpr2,
> printing non-standard size PDFs (i.e. labels), and choosing the
> correct device at all.
> However, once setup it works well at least for HP and PostScript printers
> (not so well for non-PS-cheapo*-printers).
> c) Is very fast and works well, but of course you have to pay for using it.
> d) Did not work in a reliable fashion, output gets lost sometimes.
> 
> HTH
> Henning
> 
> * a tribute to the great Benny Hill
> 
>


More information about the reportlab-users mailing list