Skip to content

Commit

Permalink
Bunch of updates for the FileOpen script
Browse files Browse the repository at this point in the history
  • Loading branch information
noDRM committed Dec 3, 2023
1 parent e4e5808 commit 737d5e7
Show file tree
Hide file tree
Showing 3 changed files with 371 additions and 466 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 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).

4 changes: 2 additions & 2 deletions DeDRM_plugin/ineptpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 Float required: %r' % x)
raise PDFTypeError('Int or Decimal required: %r' % x)
return 0
return x

Expand Down Expand Up @@ -2042,7 +2042,7 @@ def read_xref(self):
except PDFNoValidXRef:
# fallback
self.seek(0)
pat = re.compile(b'^(\\d+)\\s+(\\d+)\\s+obj\\b')
pat = re.compile(rb'^(\\d+)\\s+(\\d+)\\s+obj\\b')
offsets = {}
xref = PDFXRef()
while 1:
Expand Down
Loading

1 comment on commit 737d5e7

@ElleKayEm
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I installed the auto-release DeDRM plugin based on this commit and was able to successfully import a backup file for Kindle for Android on calibre 7.1.

Please sign in to comment.