Python Forum

Full Version: pdf file processing: how to "Enable Editing"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

When opening some pdf files, the following banner appears at the top:

─░mage


To prevent this from appearing during the next file opening, simply click on "Enable Editing" and save the file.
I am looking for a way to automate this process by using Python. For that I need to know the attribute of the pdf file which is responsible for this "Enable Editing".

Any ideas ?

Thanks.
you can read the pdf, modify and then write a new pdf with pypdf2.
(Dec-03-2019, 12:18 PM)Larz60+ Wrote: [ -> ]you can read the pdf, modify and then write a new pdf with pypdf2.
It was the core of my quesition: how to modify ?
What should I do once pdf is read ?
The example from your link doesn't match my case.
In that example the pdf is modified ... e.g. watermark is added.
In my case, I have nothing to modify in the file - I just have to activate editing and save the file so that the annoying banner disappears.