From 18ae5db06da6db751c5b1b4880f657d87ed66290 Mon Sep 17 00:00:00 2001 From: "James R. Barlow" Date: Thu, 27 Oct 2016 15:35:33 -0700 Subject: [PATCH] ghostscript: ensure raster resolution is specified in integer units --- ocrmypdf/ghostscript.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocrmypdf/ghostscript.py b/ocrmypdf/ghostscript.py index c043270d..0e3200d1 100644 --- a/ocrmypdf/ghostscript.py +++ b/ocrmypdf/ghostscript.py @@ -21,7 +21,7 @@ def rasterize_pdf(input_file, output_file, xres, yres, raster_device, log, '-dFirstPage=%i' % pageno, '-dLastPage=%i' % pageno, '-o', tmp.name, - '-r{0}x{1}'.format(str(xres), str(yres)), + '-r{0}x{1}'.format(str(round(xres)), str(round(yres))), input_file ]