py-pdf / pdfly

CLI tool to extract (meta)data from PDF and manipulate PDF files
BSD 3-Clause "New" or "Revised" License
109 stars 18 forks source link

Show pdf permissions #19

Open MartinThoma opened 1 year ago

MartinThoma commented 1 year ago

https://unix.stackexchange.com/questions/552452/how-do-i-detect-a-restricted-pdf-using-command-line

pubpub-zz commented 1 year ago

Personnally I use this code to remove permissions:

import pypdf
www = pypdf.PdfWriter(clone_from="input.pdf")
www.write("output.pdf")