diff options
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qpagedpaintdevice.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qpdf.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qpdf_p.h | 1 | ||||
-rw-r--r-- | src/gui/painting/qpdfwriter.cpp | 2 |
4 files changed, 6 insertions, 7 deletions
diff --git a/src/gui/painting/qpagedpaintdevice.cpp b/src/gui/painting/qpagedpaintdevice.cpp index f41d1830fd..b95b3e3503 100644 --- a/src/gui/painting/qpagedpaintdevice.cpp +++ b/src/gui/painting/qpagedpaintdevice.cpp @@ -71,7 +71,7 @@ static const struct { {125, 176}, // B6 {88, 125}, // B7 {62, 88}, // B8 - {33, 62}, // B9 + {44, 62}, // B9 {163, 229}, // C5E {105, 241}, // US Common {110, 220}, // DLE @@ -133,7 +133,7 @@ QPagedPaintDevice::~QPagedPaintDevice() \value B6 125 x 176 mm \value B7 88 x 125 mm \value B8 62 x 88 mm - \value B9 33 x 62 mm + \value B9 44 x 62 mm \value B10 31 x 44 mm \value C5E 163 x 229 mm \value Comm10E 105 x 241 mm, U.S. Common 10 Envelope diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index c05f47c59d..147fa3f561 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1486,7 +1486,6 @@ QPdfEnginePrivate::QPdfEnginePrivate() leftMargin(10), topMargin(10), rightMargin(10), bottomMargin(10) // ~3.5 mm { resolution = 1200; - postscript = false; currentObject = 1; currentPage = 0; stroker.stream = 0; @@ -1520,7 +1519,6 @@ bool QPdfEngine::begin(QPaintDevice *pdev) d->ownsDevice = true; } - d->postscript = false; d->currentObject = 1; d->currentPage = new QPdfPage; @@ -2506,8 +2504,8 @@ void QPdfEnginePrivate::drawTextItem(const QPointF &p, const QTextItemInt &ti) QFontEngine::FaceId face_id = fe->faceId(); bool noEmbed = false; if (face_id.filename.isEmpty() - || (!postscript && ((fe->fsType & 0x200) /* bitmap embedding only */ - || (fe->fsType == 2) /* no embedding allowed */))) { + || fe->fsType & 0x200 /* bitmap embedding only */ + || fe->fsType == 2 /* no embedding allowed */) { *currentPage << "Q\n"; q->QPaintEngine::drawTextItem(p, ti); *currentPage << "q\n"; diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h index 54530d0f78..ae2d4b00ac 100644 --- a/src/gui/painting/qpdf_p.h +++ b/src/gui/painting/qpdf_p.h @@ -250,7 +250,6 @@ public: void newPage(); - bool postscript; int currentObject; QPdfPage* currentPage; diff --git a/src/gui/painting/qpdfwriter.cpp b/src/gui/painting/qpdfwriter.cpp index a783aad66a..27fb8b1646 100644 --- a/src/gui/painting/qpdfwriter.cpp +++ b/src/gui/painting/qpdfwriter.cpp @@ -209,6 +209,8 @@ void QPdfWriter::setMargins(const Margins &m) { Q_D(QPdfWriter); + QPagedPaintDevice::setMargins(m); + const qreal multiplier = 72./25.4; d->engine->d_func()->leftMargin = m.left*multiplier; d->engine->d_func()->rightMargin = m.right*multiplier; |