Skip to content

Commit

Permalink
keep coverage for now
Browse files Browse the repository at this point in the history
Co-authored-by: pubpub-zz <4083478+pubpub-zz@users.noreply.github.com>
  • Loading branch information
stefan6419846 and pubpub-zz authored Dec 20, 2024
1 parent 358f1e3 commit 51e1de5
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions pypdf/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -1980,21 +1980,12 @@ def process_operation(operator: bytes, operands: List[Any]) -> None:
memo_tm = tm_matrix.copy()
# Table 5.2 page 398
elif operator == b"Tz":
if operands:
char_scale = float(operands[0]) / 100.0
else:
char_scale = 1.0
char_scale = float(operands[0]) / 100.0 if operands else 1.0
elif operator == b"Tw":
if operands:
space_scale = 1.0 + float(operands[0])
else:
space_scale = 1.0
space_scale = 1.0 + float(operands[0] if operands else 0.0)
elif operator == b"TL":
if operands:
scale_x = math.sqrt(tm_matrix[0]**2 + tm_matrix[2]**2)
TL = float(operands[0]) * font_size * scale_x
else:
TL = 0.0
scale_x = math.sqrt(tm_matrix[0]**2 + tm_matrix[2]**2)
TL = float(operands[0] if operands else 0.0) * font_size * scale_x
elif operator == b"Tf":
if text != "":
output += text # .translate(cmap)
Expand Down

0 comments on commit 51e1de5

Please sign in to comment.