Compare commits

..

1 Commits

Author SHA1 Message Date
Aleksa Sarai
f9fecbde6d Merge ad33aea18d into ef67dbd204 2023-08-06 21:05:10 +03:00
4 changed files with 466 additions and 376 deletions

View File

@@ -103,6 +103,3 @@ This is v10.0.9, a release candidate for v10.1.0. I don't expect there to be maj
- Fix a bug where decrypting a 256-bit AES pdf with V=5 didn't work.
- Fix bugs in kgenpids.py, alfcrypto.py, mobidedrm.py and kindlekey.py that caused it to fail on Python 2 (#380).
- Fix some bugs (Python 2 and Python 3) in erdr2pml.py (untested).
- Fix file lock bug in androidkindlekey.py on Windows with Calibre >= 7 (untested).
- A bunch of updates to the external FileOpen ineptpdf script, might fix #442 (untested).

View File

@@ -201,9 +201,6 @@ def get_serials2(path=STORAGE2):
for y in tokens:
serials.append(y)
serials.append(x+y)
connection.close()
return serials
def get_serials(path=STORAGE):

View File

@@ -834,7 +834,7 @@ def num_value(x):
x = resolve1(x)
if not (isinstance(x, int) or isinstance(x, Decimal)):
if STRICT:
raise PDFTypeError('Int or Decimal required: %r' % x)
raise PDFTypeError('Int or Float required: %r' % x)
return 0
return x
@@ -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(b'^(\\d+)\\s+(\\d+)\\s+obj\\b')
offsets = {}
xref = PDFXRef()
while 1: