rebuild for 10.11+
This commit is contained in:
parent
d989eff547
commit
901b731582
234 changed files with 1522 additions and 927 deletions
|
|
@ -373,7 +373,7 @@ def pdf_repr(x):
|
|||
elif isinstance(x, list):
|
||||
return bytes(PdfArray(x))
|
||||
elif ((py3 and isinstance(x, str)) or
|
||||
(not py3 and isinstance(x, unicode))):
|
||||
(not py3 and isinstance(x, unicode))): # noqa: F821
|
||||
return pdf_repr(encode_text(x))
|
||||
elif isinstance(x, bytes):
|
||||
# XXX escape more chars? handle binary garbage
|
||||
|
|
@ -386,7 +386,8 @@ def pdf_repr(x):
|
|||
|
||||
|
||||
class PdfParser:
|
||||
"""Based on https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
|
||||
"""Based on
|
||||
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf
|
||||
Supports PDF up to 1.4
|
||||
"""
|
||||
|
||||
|
|
@ -863,7 +864,8 @@ class PdfParser:
|
|||
raise PdfFormatError(
|
||||
"unrecognized object: " + repr(data[offset:offset+32]))
|
||||
|
||||
re_lit_str_token = re.compile(br"(\\[nrtbf()\\])|(\\[0-9]{1,3})|(\\(\r\n|\r|\n))|(\r\n|\r|\n)|(\()|(\))")
|
||||
re_lit_str_token = re.compile(
|
||||
br"(\\[nrtbf()\\])|(\\[0-9]{1,3})|(\\(\r\n|\r|\n))|(\r\n|\r|\n)|(\()|(\))")
|
||||
escaped_chars = {
|
||||
b"n": b"\n",
|
||||
b"r": b"\r",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue