PDA

View Full Version : Need advices for build and print document.



cydside
26th May 2011, 10:21
Hi to all,
I really need help to build a specific document. That document shoul have five blocks(expressed in mm, see the 'Page Structure' in attach) populated by text or image or both. I read about three approaches, first, populating a QTextDocument
with raw HTML, second, populating a QTextDocument using a QTextCursor, and
third, painting a document with QPainter, so what is the best way, in your experience, to build that document? Moreover, do you know any examples?
Thanks in advance.

wysota
27th May 2011, 21:29
It depends what you want to do with the document and how long the document would be. If it is short and you only need to print it then using QPainter directly on a printer would be the simplest approach. Using HTML is also easy but it is hard to control the size of the document this way.