From 8951d7dd0560a0b6c5336b691c7490f10c431e02 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Mon, 18 Jan 2016 10:51:20 -0800 Subject: [PATCH] Fix PDF size check -- in Postscript units not inches --- src/img2pdf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/img2pdf.py b/src/img2pdf.py index fd45a1a..d9f628a 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -146,10 +146,10 @@ class pdfdoc(object): if pdf_x < 3.00 or pdf_y < 3.00: warning_out("pdf width or height is below 3.00\" - decrease the dpi") - elif pdf_x > 200.0 or pdf_y > 200.0: + elif pdf_x > 14400.0 or pdf_y > 14400.0: warning_out("pdf width or height would be above 200\" - squeezed inside") - x_scale = 200.0 / pdf_x - y_scale = 200.0 / pdf_y + x_scale = 14400.0 / pdf_x + y_scale = 14400.0 / pdf_y scale = min(x_scale, y_scale) * 0.999 pdf_x *= scale pdf_y *= scale