Skip to content

Commit

Permalink
fix deprecated pypdf property
Browse files Browse the repository at this point in the history
  • Loading branch information
a.fazlyev committed Jan 14, 2025
1 parent 6bc1e13 commit ac9849b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions excalibur/utils/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_pages(filename, pages, password=""):
if pages == "1":
page_numbers.append({"start": 1, "end": 1})
else:
if infile.isEncrypted:
if infile.is_encrypted:
infile.decrypt(password)
if pages == "all":
page_numbers.append({"start": 1, "end": len(infile.pages)})
Expand Down Expand Up @@ -74,7 +74,7 @@ def save_page(filepath, page_number):
outpath_new = "".join([froot.replace("page", "p"), "_rotated", fext])
os.rename(outpath, outpath_new)
infile = PdfReader(open(outpath_new, "rb"), strict=False)
if infile.isEncrypted:
if infile.is_encrypted:
infile.decrypt("")
outfile = PdfWriter()
p = infile.pages[0]
Expand Down

0 comments on commit ac9849b

Please sign in to comment.