Skip to content

Commit

Permalink
refactor(pdf): remove redundant argument to remove vertical text
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-awd committed Oct 28, 2023
1 parent 3415241 commit 3666a6d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions monopoly/pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ def __init__(
self.page_range = slice(*pdf_config.page_range)
self.page_bbox: tuple = pdf_config.page_bbox
self.brute_force_config = brute_force_config
self.remove_vertical_text = True

def open(self, brute_force_config: BruteForceConfig = None):
"""
Expand Down Expand Up @@ -97,9 +96,8 @@ def get_pages(self, brute_force_config=None) -> list[PdfPage]:
logger.debug("Cropping page")
page.set_cropbox(self.page_bbox)

if self.remove_vertical_text:
logger.debug("Removing vertical text")
page = self._remove_vertical_text(page)
logger.debug("Removing vertical text")
page = self._remove_vertical_text(page)

pdf_byte_stream = BytesIO(document.tobytes())
pdf = pdftotext.PDF(pdf_byte_stream, physical=True)
Expand Down

0 comments on commit 3666a6d

Please sign in to comment.