1
0
Fork 0
forked from josch/img2pdf

Fix PDF size check -- in Postscript units not inches

This commit is contained in:
James R. Barlow 2016-01-18 10:51:20 -08:00
parent 1261741136
commit 8951d7dd05

View file

@ -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