Showing
3 changed files
with
9 additions
and
5 deletions
@@ -9,7 +9,7 @@ issue_tracker: https://github.com/DavBfr/dart_pdf/issues | @@ -9,7 +9,7 @@ issue_tracker: https://github.com/DavBfr/dart_pdf/issues | ||
9 | screenshots: | 9 | screenshots: |
10 | - description: 'Printing a document on iOS' | 10 | - description: 'Printing a document on iOS' |
11 | path: example.png | 11 | path: example.png |
12 | -version: 5.11.0 | 12 | +version: 5.11.1 |
13 | 13 | ||
14 | environment: | 14 | environment: |
15 | sdk: ">=3.0.0 <4.0.0" | 15 | sdk: ">=3.0.0 <4.0.0" |
@@ -102,12 +102,12 @@ bool PrintJob::printPdf(const std::string& name, | @@ -102,12 +102,12 @@ bool PrintJob::printPdf(const std::string& name, | ||
102 | dm->dmPaperSize = 0; | 102 | dm->dmPaperSize = 0; |
103 | if (width > height) { | 103 | if (width > height) { |
104 | dm->dmOrientation = DMORIENT_LANDSCAPE; | 104 | dm->dmOrientation = DMORIENT_LANDSCAPE; |
105 | - dm->dmPaperWidth = static_cast<short>(round(height * 254 / 72)); | ||
106 | - dm->dmPaperLength = static_cast<short>(round(width * 254 / 72)); | 105 | + dm->dmPaperWidth = static_cast<short>(round(height * 254 / pdfDpi)); |
106 | + dm->dmPaperLength = static_cast<short>(round(width * 254 / pdfDpi)); | ||
107 | } else { | 107 | } else { |
108 | dm->dmOrientation = DMORIENT_PORTRAIT; | 108 | dm->dmOrientation = DMORIENT_PORTRAIT; |
109 | - dm->dmPaperWidth = static_cast<short>(round(width * 254 / 72)); | ||
110 | - dm->dmPaperLength = static_cast<short>(round(height * 254 / 72)); | 109 | + dm->dmPaperWidth = static_cast<short>(round(width * 254 / pdfDpi)); |
110 | + dm->dmPaperLength = static_cast<short>(round(height * 254 / pdfDpi)); | ||
111 | } | 111 | } |
112 | } | 112 | } |
113 | 113 |
-
Please register or login to post a comment