summaryrefslogtreecommitdiff
path: root/libmat2/pdf.py
diff options
context:
space:
mode:
authorjvoisin2018-07-19 23:10:27 +0200
committerjvoisin2018-07-19 23:10:27 +0200
commit942859601d5d08f05b374d1f12270192cede1155 (patch)
treec312dcc89181b7ffc50eebe989074af52fba9619 /libmat2/pdf.py
parent565cb66d1405bc334681e59ae41f8631b96e7d51 (diff)
Improve the code's documentation
Diffstat (limited to 'libmat2/pdf.py')
-rw-r--r--libmat2/pdf.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmat2/pdf.py b/libmat2/pdf.py
index 053a768..d3c4698 100644
--- a/libmat2/pdf.py
+++ b/libmat2/pdf.py
@@ -47,7 +47,7 @@ class PDFParser(abstract.AbstractParser):
47 pages_count = document.get_n_pages() 47 pages_count = document.get_n_pages()
48 48
49 tmp_path = tempfile.mkstemp()[1] 49 tmp_path = tempfile.mkstemp()[1]
50 pdf_surface = cairo.PDFSurface(tmp_path, 10, 10) 50 pdf_surface = cairo.PDFSurface(tmp_path, 10, 10) # resized later anyway
51 pdf_context = cairo.Context(pdf_surface) # context draws on the surface 51 pdf_context = cairo.Context(pdf_surface) # context draws on the surface
52 52
53 for pagenum in range(pages_count): 53 for pagenum in range(pages_count):
@@ -101,7 +101,7 @@ class PDFParser(abstract.AbstractParser):
101 pdf_surface.set_size(page_width*self.__scale, page_height*self.__scale) 101 pdf_surface.set_size(page_width*self.__scale, page_height*self.__scale)
102 pdf_context.set_source_surface(img, 0, 0) 102 pdf_context.set_source_surface(img, 0, 0)
103 pdf_context.paint() 103 pdf_context.paint()
104 pdf_context.show_page() 104 pdf_context.show_page() # draw pdf_context on pdf_surface
105 105
106 pdf_surface.finish() 106 pdf_surface.finish()
107 107