[PyKDE] Printing (General)
Greg Fortune
lists at gregfortune.com
Tue Mar 11 06:56:00 GMT 2003
<snip>
> Have you looked at QPrinter? I haven't actually used it that I can
> recall, but you should be able to lay out reports in QtDesigner and
> print them at higher dpi - at least that's what I get from
> reading the QPrinter docs.
Haven't tried working with QPrinter through Designer... Take a look at the
helpviewer example included with qt to get an idea for how to use it with
QRichText.
>
> What I've done for printing forms (invoices, purchase orders,
> packing lists, etc) is use ReportLab which is a Python PDF
> generator. The way I used it is probably at a lower level than
> you're looking for, however I think they have some higher level
> stuff too. I don't have a URL handy, but a search on "ReportLab"
http://www.reportlab.com
> should turn it up pretty quickly. I wouldn't necessarily call it
> 'easy' though.
I ended up using this on the last app I worked on and I must agree. It's not
terribly easy to use, but it does work well. My biggest complaint is that it
generates PDF files and I wanted to print stuff from inside my app rather
than just saving a PDF file to be printed later. I had some nasty
os.system() stuff on the Linux side, but never figured out anything useful on
the Windows side. I may have just missed something though...
I do have a little code (circa 2.5 years ago) that works with the current
version of reportlab that you're free to dig through.
Greg
More information about the PyQt
mailing list