Allow encrypted PDF total page number instrospection to work

when PDF has non ASCII user properties. GitLab issue #411.
Thanks to @corneliusludmann for the report and investigation.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-07-22 02:42:50 -04:00
parent 688571688c
commit 6dc45a1c7f
2 changed files with 2 additions and 1 deletions

View File

@@ -151,7 +151,7 @@ class Python(ConverterBase):
page_count = int(
filter(
lambda line: line.startswith('Pages:'),
process.stdout.split(b'\n')
force_text(process.stdout).split('\n')
)[0].replace('Pages:', '')
)
file_object.seek(0)