Printing a file
diesch at spamfence.net
Fri Mar 3 16:14:22 CET 2006
Fabian Steiner <lists at fabis-site.net> wrote:
> I am currently working on an application where the user is able to
> create new worksheets and to delete existing ones. All of these
> worksheets have the same structure (--> template?), only some values
> should be changed. A minimal example would be something like this:
> Name: ...........
> Role: ............
> Address: ............
> The values are stored in a SQLite database. Now I would like to offer
> the possibility to print out a single record on a DinA4 paper. In order
> to do this, the dots (...) above of course have to be replaced by the
> current record's values and the different parts have to fit on one page.
> Unfortunately I don't know how to realize this, since also some images
> and different boxes should be printed out. As the whole application is
> based on QT, QPrinter might be used, but I couldn't find any examples
> how to use it.
> What do you suggest? Which format should the template have? (XML, etc.?)
I would either use something like ReportLab to create PDF or some
external type-setting language like LaTeX, *roff or docbook if they are
No no no! In maths things are usually named after Euler, or the first
person to discover them after Euler.
[Steven D'Aprano in <pan.2005.11.22.10.29.25.388240 at REMOVETHIScyber.com.au>]
More information about the Python-list