Fix pdftopng usage

Delete cache
pull/198/head
Vinayak Mehta 2021-06-28 01:09:45 +05:30
parent 286b2d6a1c
commit fdade4502e
No known key found for this signature in database
GPG Key ID: 2DE013537A15A9A4
2 changed files with 2 additions and 2 deletions

View File

@ -17,3 +17,4 @@ class BaseParser(object):
self.vertical_text = get_text_objects(self.layout, ltype="vertical_text")
self.pdf_width, self.pdf_height = self.dimensions
self.rootname, __ = os.path.splitext(self.filename)
self.imagename = "".join([self.rootname, ".png"])

View File

@ -210,8 +210,7 @@ class Lattice(BaseParser):
def _generate_image(self):
from pdftopng import pdftopng
self.imagename = "".join([self.rootname, ".png"])
pdftopng.convert(pdf_path=self.filename, png_path=self.rootname)
pdftopng.convert(pdf_path=self.filename, png_path=self.imagename)
def _generate_table_bbox(self):
def scale_areas(areas):