[Qt-interest] pdf printer 1200 DPI and font size

Sylvain Pointeau sylvain.pointeau at gmail.com
Mon Apr 4 13:37:55 CEST 2011


I found a part of my problem...

when we do:

    int LogicalWidth  = 210;

    int LogicalHeight = 297;

    painter.setWindow(0, 0,LogicalWidth, LogicalHeight);


Those lines are incorrect, because it doesn't take the margins into the
calculation.

If I do instead this one below, this is correct, I obtain the right results:

    QTransform transformMM = QTransform::fromScale(

        printer.physicalDpiX() / 25.400,

        printer.physicalDpiY() / 25.400

    );

    painter.setWorldTransform(transformMM, false);


I will now investigate into the font size

so if you have any idea .... :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110404/47f3869b/attachment.html 


More information about the Qt-interest-old mailing list