Hi there,
I have trouble printing a rich text document to a printer with HighResolution settings.
So far I use something in the lines of:
whereas text is a QTextDocument, and painter is a QPainter created for a printer object. The printer was initialized with QPrinter::HighResolution.Qt Code:
layout->draw(painter, context);To copy to clipboard, switch view to plain text mode
It seems that printing with high-resolution is somewhat tricky. For example, the font metrics returned have to be scaled manually to obtain a correct line spacing. And maybe that's also the reason why the draw() function of QAbstractTextDocumentLayout doesn't work as expected?
Any suggestions are welcome!
Andreas
Bookmarks