From e90688972e5711ff2be740a1499983cc8bd1a73f Mon Sep 17 00:00:00 2001 From: Jim Barlow Date: Thu, 10 Apr 2014 23:30:32 -0700 Subject: [PATCH] Check for oversized PDF --- src/img2pdf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/img2pdf.py b/src/img2pdf.py index 9753a7b..43c47ab 100755 --- a/src/img2pdf.py +++ b/src/img2pdf.py @@ -129,6 +129,8 @@ 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: + error_out(("pdf width or height is above 200.00 - increase the dpi") # either embed the whole jpeg or deflate the bitmap representation if imgformat is "JPEG":