Re: [PyQt] pdf print
Hi Nahuel, list, On Thu, Feb 26, 2009 at 10:41 PM, Nahuel Defossé nahueldefo...@yahoo.com.ar wrote: Hi I've created pdf output in a StringIO file which I'd like to print in my PyQt4 app. Should I save it and send it to the system default reader? or could I automate this task? Is it possible to pirnt the file directly from PyQt? Like Jim Bublitz, I'm using reportlab to generate pdf invoices. Instead of mucking around with printers and such I open the file in a pdf reader, using subprocess.call(). That way I also get a sort of print preview for free, and it works with the same code on linux and windows. I'm happy with that, although I did have some issues with file name encoding on windows. Hat tip: encode the command string with sys.getfilesystemencoding(), else it will blow up on windows. Take care, Håvard -- Håvard Gulldahl hav...@gulldahl.no ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] pdf print
Hi I've created pdf output in a StringIO file which I'd like to print in my PyQt4 app. Should I save it and send it to the system default reader? or could I automate this task? Is it possible to pirnt the file directly from PyQt? Thanks Nahuel ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] pdf print
On Thursday 26 February 2009 13:41:41 pm Nahuel Defossé wrote: Hi I've created pdf output in a StringIO file which I'd like to print in my PyQt4 app. Should I save it and send it to the system default reader? or could I automate this task? Is it possible to pirnt the file directly from PyQt? Thanks Nahuel I use pdfs for checks, invoices, etc. ReportLab lets you do very precise layout easily. I just save them as a temporary file and then use os.system and an lpr command to send them to the printer (under Linux): Then cups worries about finding the printer, checking its status, managing the queue, translating to Postscript, etc. Not sure how you'd do it with Windows or if you can send pdfs directly to the printer. Jim ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt