Bunch of updates for the FileOpen script
This commit is contained in:
parent
e4e5808894
commit
737d5e7f1e
|
@ -104,4 +104,5 @@ This is v10.0.9, a release candidate for v10.1.0. I don't expect there to be maj
|
||||||
- Fix bugs in kgenpids.py, alfcrypto.py, mobidedrm.py and kindlekey.py that caused it to fail on Python 2 (#380).
|
- 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 some bugs (Python 2 and Python 3) in erdr2pml.py (untested).
|
||||||
- Fix file lock bug in androidkindlekey.py on Windows with Calibre >= 7 (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).
|
||||||
|
|
||||||
|
|
|
@ -834,7 +834,7 @@ def num_value(x):
|
||||||
x = resolve1(x)
|
x = resolve1(x)
|
||||||
if not (isinstance(x, int) or isinstance(x, Decimal)):
|
if not (isinstance(x, int) or isinstance(x, Decimal)):
|
||||||
if STRICT:
|
if STRICT:
|
||||||
raise PDFTypeError('Int or Float required: %r' % x)
|
raise PDFTypeError('Int or Decimal required: %r' % x)
|
||||||
return 0
|
return 0
|
||||||
return x
|
return x
|
||||||
|
|
||||||
|
@ -2042,7 +2042,7 @@ class PDFParser(PSStackParser):
|
||||||
except PDFNoValidXRef:
|
except PDFNoValidXRef:
|
||||||
# fallback
|
# fallback
|
||||||
self.seek(0)
|
self.seek(0)
|
||||||
pat = re.compile(b'^(\\d+)\\s+(\\d+)\\s+obj\\b')
|
pat = re.compile(rb'^(\\d+)\\s+(\\d+)\\s+obj\\b')
|
||||||
offsets = {}
|
offsets = {}
|
||||||
xref = PDFXRef()
|
xref = PDFXRef()
|
||||||
while 1:
|
while 1:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue