Skip to content

Commit

Permalink
Fix typos in xref display
Browse files Browse the repository at this point in the history
  • Loading branch information
desgeeko committed Aug 19, 2024
1 parent 16fc25f commit af7ab41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pdfsyntax/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ def build_xref_table(table: list, index: list) -> str:
start, size = x
ret += f'{start} {size}'
elif len(x) == 4:
pos, o_num, o_gen, st = x
if st == b'f':
continue
pos, o_num, o_gen, st = x
_, _, o_ver = recent_ref_from_index(index, complex(o_gen, o_num))
ret += f'{pos:010} {o_gen:05} {st.decode('ascii')}'
ret += f'{pos:010} {o_gen:05} {st.decode("ascii")}'
if o_num != 0:
ret += ' '
ret += f'<a href="#obj{o_num}.{o_gen}.{o_ver}">'
Expand All @@ -209,9 +209,9 @@ def build_xref_stream_item(item: tuple, index: list) -> str:
ret += '</a>'
ret += ' '
if env_num:
ret += f'In object stream {env_num} at {pos:010} {st.decode('ascii')}'
ret += f'In object stream {env_num} at {pos:010} {st.decode("ascii")}'
else:
ret += f'At absolute position {pos:010} {st.decode('ascii')}'
ret += f'At absolute position {pos:010} {st.decode("ascii")}'
ret += '\n'
return ret

Expand Down

0 comments on commit af7ab41

Please sign in to comment.