Skip to content

Commit ff6ddfe

Browse files
Wiktor FranusJoshData
authored andcommitted
Skip non-text elements during pdf serialization. (JoshData#24)
1 parent 4a0f153 commit ff6ddfe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pdf_diff/command_line.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ def serialize_pdf(i, fn, top_margin, bottom_margin):
2727
text = []
2828
textlength = 0
2929
for run in box_generator:
30+
if run["text"] is None:
31+
continue
32+
3033
normalized_text = run["text"].strip()
3134

3235
# Ensure that each run ends with a space, since pdftotext

0 commit comments

Comments
 (0)