Skip to content

Instantly share code, notes, and snippets.

@MarcHeiden
Created October 12, 2022 19:51
Show Gist options
  • Save MarcHeiden/0e6451c645348a027c14d629a27a0cef to your computer and use it in GitHub Desktop.
Save MarcHeiden/0e6451c645348a027c14d629a27a0cef to your computer and use it in GitHub Desktop.
import pikepdf
pdf_loc = input("PDF location: ")
pdf_pass = input("PDF password: ")
pdf = pikepdf.open(pdf_loc, password=pdf_pass)
pdf_loc2 = input("Save PDF file under: ")
pdf.save(pdf_loc2)
print("The password was successfully removed from the PDF.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment