PDA

View Full Version : How can I put text on each page using QPrinter



davit
15th April 2007, 08:44
Hi all,

I want to print something using QPrinter, and I want to put text (description, comment, ...) on each page. How can I do it?
I have one solution: generate postscript file, devide it per pages, put text on each page and recombone all pages to one. But I don't think that it is good solution.
How can I do it by using QPrinter?

Please help me. I think that any replay can be useful.

Thanks in advance.
--davit

wysota
15th April 2007, 09:04
Draw the text on each page using QPainter::drawText. QPrinter is a paint device just like QWidget, so you can open a QPainter on it and draw whatever you like.

davit
15th April 2007, 12:23
Thanks wysota for suggestion. I will try to do that way.

--davit