mirror of
https://github.com/encounter/phantomjs.git
synced 2026-07-10 21:18:40 -07:00
Merge pull request #273 from ferama/master
fix wrong pdf margins using custom header/footer
This commit is contained in:
@@ -1441,11 +1441,12 @@ void QWebFrame::print(QPrinter* printer) const
|
||||
void QWebFrame::print(QPrinter *printer, PrintCallback *callback) const
|
||||
{
|
||||
QPainter painter;
|
||||
if (!painter.begin(printer))
|
||||
return;
|
||||
|
||||
HeaderFooter headerFooter(this, printer, callback);
|
||||
|
||||
if (!painter.begin(printer))
|
||||
return;
|
||||
|
||||
const qreal zoomFactorX = (qreal)printer->logicalDpiX() / qt_defaultDpi();
|
||||
const qreal zoomFactorY = (qreal)printer->logicalDpiY() / qt_defaultDpi();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user