Skip to content

Commit

Permalink
Always use LTR direction when printing PDF header and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed May 21, 2024
1 parent c348070 commit 4c024ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backend/globaleaks/handlers/recipient/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,18 @@ def __init__(self, *args, **kwargs):
def header(self):
self.set_font(self.report_default_font, "", 9)
self.cell(80)
self.set_text_shaping(use_shaping_engine=True, direction="ltr")
self.cell(30, 10, self.title, align="C")
self.set_text_shaping(use_shaping_engine=True, direction=self.report_direction)
self.ln(20)


def footer(self):
self.set_y(-15)
self.set_font(self.report_default_font, "", 9)
self.set_text_shaping(use_shaping_engine=True, direction="ltr")
self.cell(0, 10, f"{self.page_no()}/{{nb}}", align="C")
self.set_text_shaping(use_shaping_engine=True, direction=self.report_direction)

def output(self, *args, **kwargs):
for font in list(self.fonts.keys()):
Expand Down

0 comments on commit 4c024ec

Please sign in to comment.