From 893f58554ab963f8abd4a08222a311014322fff1 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 2 Jul 2018 00:22:05 +0200 Subject: Improve a bit the formatting of the code thanks to pyflakes3 --- libmat2/pdf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libmat2/pdf.py') diff --git a/libmat2/pdf.py b/libmat2/pdf.py index 300fd4a..fa7f764 100644 --- a/libmat2/pdf.py +++ b/libmat2/pdf.py @@ -83,7 +83,9 @@ class PDFParser(abstract.AbstractParser): page_width, page_height = page.get_size() logging.info("Rendering page %d/%d", pagenum + 1, pages_count) - img_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(page_width) * self.__scale, int(page_height) * self.__scale) + width = int(page_width) * self.__scale + height = int(page_height) * self.__scale + img_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height) img_context = cairo.Context(img_surface) img_context.scale(self.__scale, self.__scale) -- cgit v1.3