Compare commits
2 Commits
737d5e7f1e
...
bf2471e65b
Author | SHA1 | Date |
---|---|---|
NoDRM | bf2471e65b | |
NoDRM | 5492dcdbf4 |
|
@ -2042,7 +2042,7 @@ class PDFParser(PSStackParser):
|
|||
except PDFNoValidXRef:
|
||||
# fallback
|
||||
self.seek(0)
|
||||
pat = re.compile(rb'^(\\d+)\\s+(\\d+)\\s+obj\\b')
|
||||
pat = re.compile(br'^(\\d+)\\s+(\\d+)\\s+obj\\b')
|
||||
offsets = {}
|
||||
xref = PDFXRef()
|
||||
while 1:
|
||||
|
|
|
@ -74,7 +74,7 @@ class KFXZipBook:
|
|||
# Belt and braces. PIDs should be unicode strings, but just in case...
|
||||
if isinstance(pid, bytes):
|
||||
pid = pid.decode('ascii')
|
||||
for dsn_len,secret_len in [(0,0), (16,0), (16,40), (32,40), (40,0), (40,40)]:
|
||||
for dsn_len,secret_len in [(0,0), (16,0), (16,40), (32,0), (32,40), (40,0), (40,40)]:
|
||||
if len(pid) == dsn_len + secret_len:
|
||||
break # split pid into DSN and account secret
|
||||
else:
|
||||
|
|
|
@ -2643,7 +2643,7 @@ class PDFParser(PSStackParser):
|
|||
except PDFNoValidXRef:
|
||||
# fallback
|
||||
self.seek(0)
|
||||
pat = re.compile(rb'^(\d+)\s+(\d+)\s+obj\b')
|
||||
pat = re.compile(br'^(\\d+)\\s+(\\d+)\\s+obj\\b')
|
||||
offsets = {}
|
||||
xref = PDFXRef()
|
||||
while 1:
|
||||
|
|
Loading…
Reference in New Issue