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: if pdf_x < 3.00 or pdf_y < 3.00:
warning_out("pdf width or height is below 3.00\" - decrease the dpi") 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") warning_out("pdf width or height would be above 200\" - squeezed inside")
x_scale = 200.0 / pdf_x x_scale = 14400.0 / pdf_x
y_scale = 200.0 / pdf_y y_scale = 14400.0 / pdf_y
scale = min(x_scale, y_scale) * 0.999 scale = min(x_scale, y_scale) * 0.999
pdf_x *= scale pdf_x *= scale
pdf_y *= scale pdf_y *= scale