Skip to content

Commit 744276a

Browse files
committed
abort early if there are no text differences, otherwise we get an error saving a zero-height image
1 parent 69ddcf2 commit 744276a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pdf_diff/command_line.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ def render_changes(changes, styles, stream):
170170
# Merge sequential boxes to avoid sequential disjoint rectangles.
171171

172172
changes = simplify_changes(changes)
173+
if len(changes) == 0:
174+
raise Exception("There are no text differences.")
173175

174176
# Make images for all of the pages named in changes.
175177

0 commit comments

Comments
 (0)