From 50aff1474f4bbd07a834de31ec80446a9c392dcb Mon Sep 17 00:00:00 2001 From: josch Date: Wed, 23 Oct 2013 08:49:59 +0200 Subject: [PATCH] check for minimum pdf page size --- img2pdf.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/img2pdf.py b/img2pdf.py index 86fd377..23d88e5 100755 --- a/img2pdf.py +++ b/img2pdf.py @@ -152,6 +152,9 @@ def main(images, dpi, title=None, author=None, creator=None, producer=None, pdf_x, pdf_y = 72.0*width/dpi_x, 72.0*height/dpi_y # pdf units = 1/72 inch + if pdf_x < 3.00 or pdf_y < 3.00: + warning_out("pdf width or height is below 3.00 - decrease the dpi") + # either embed the whole jpeg or deflate the bitmap representation if imgformat is "JPEG": ofilter = [ "/DCTDecode" ]