-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST: Add tests for utils, form fields, PageRange (#827)
getFormTextFields now return an empty dict instead of throwing an exception if no form fields are found. This should eliminate an error source
- Loading branch information
1 parent
355f805
commit f90a9d7
Showing
9 changed files
with
62 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
|
||
|
||
""" | ||
Implementation of generic PDF objects (dictionary, number, string, and so on) | ||
Implementation of generic PDF objects (dictionary, number, string, and so on). | ||
""" | ||
__author__ = "Mathieu Fenniak" | ||
__author_email__ = "[email protected]" | ||
|
@@ -75,8 +75,9 @@ def readObject(stream, pdf): | |
elif idx == 1: | ||
# hexadecimal string OR dictionary | ||
peek = stream.read(2) | ||
stream.seek(-2, 1) # reset to start | ||
if peek == b_('<<'): | ||
stream.seek(-2, 1) # reset to start | ||
|
||
if peek == b_("<<"): | ||
return DictionaryObject.readFromStream(stream, pdf) | ||
else: | ||
return readHexStringFromStream(stream) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule sample-files
updated
3 files
+7 −4 | .github/workflows/json_consistency.py | |
+ − | 011-google-doc-document/google-doc-document.pdf | |
+9 −0 | files.json |