Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
jvoisin
mat2
Commits
f6381680
Commit
f6381680
authored
Nov 06, 2020
by
jvoisin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better handling of malformed pdf
parent
b84f73c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
libmat2/pdf.py
libmat2/pdf.py
+3
-0
No files found.
libmat2/pdf.py
View file @
f6381680
...
...
@@ -84,6 +84,9 @@ class PDFParser(abstract.AbstractParser):
for
pagenum
in
range
(
pages_count
):
page
=
document
.
get_page
(
pagenum
)
if
page
is
None
:
logging
.
error
(
"Unable to get PDF pages"
)
return
False
page_width
,
page_height
=
page
.
get_size
()
logging
.
info
(
"Rendering page %d/%d"
,
pagenum
+
1
,
pages_count
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment