summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpdf.cpp
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2019-02-01 13:33:25 +0100
committerPaul Wicking <paul.wicking@qt.io>2019-02-01 13:33:26 +0100
commit2bc362c9fa37455afbeb56e5f1852188ede3eab4 (patch)
treeb89e3c2c082a0285e8cd91733ddbc772fe4362a5 /src/gui/painting/qpdf.cpp
parent5de981d3bc3df874f9df35a6899345f4f61fa951 (diff)
parent481db443d502c8ebc169b7256cb696428cf02199 (diff)
Merge dev into 5.13
Diffstat (limited to 'src/gui/painting/qpdf.cpp')
-rw-r--r--src/gui/painting/qpdf.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index 83c7ba1add..b23cc903b1 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -1954,13 +1954,14 @@ void QPdfEnginePrivate::writePage()
"/Contents %d 0 R\n"
"/Resources %d 0 R\n"
"/Annots %d 0 R\n"
- "/MediaBox [0 0 %f %f]\n",
+ "/MediaBox [0 0 %s %s]\n",
pageRoot, pageStream, resources, annots,
// make sure we use the pagesize from when we started the page, since the user may have changed it
- currentPage->pageSize.width() / userUnit, currentPage->pageSize.height() / userUnit);
+ QByteArray::number(currentPage->pageSize.width() / userUnit, 'f').constData(),
+ QByteArray::number(currentPage->pageSize.height() / userUnit, 'f').constData());
if (pdfVersion >= QPdfEngine::Version_1_6)
- xprintf("/UserUnit %f\n", userUnit);
+ xprintf("/UserUnit %s\n", QByteArray::number(userUnit, 'f').constData());
xprintf(">>\n"
"endobj\n");