Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pdf_redactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,11 +376,11 @@ def __str__(self):
# __str__ is used for serialization
if self.value == self.original_value:
# If unchanged, return the raw original value without decoding/encoding.
return PdfString.from_bytes(self.raw_original_value)
return PdfString.from_bytes(self.raw_original_value, bytes_encoding='hex')
else:
# If the value changed, encode it from Unicode according to the encoding
# of the font that is active at the location of this token.
return PdfString.from_bytes(fromUnicode(self.value, self.font, fontcache, options))
return PdfString.from_bytes(fromUnicode(self.value, self.font, fontcache, options), bytes_encoding='hex')
def __repr__(self):
# __repr__ is used for debugging
return "Token<%s>" % repr(self.value)
Expand Down