Python Forum
pdf file processing: how to "Enable Editing"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pdf file processing: how to "Enable Editing"
#1
Hello,

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

[Image: pdf-enable-editing-banner.jpg]

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.
Reply
#2
you can read the pdf, modify and then write a new pdf with pypdf2.
Reply
#3
(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 ?
Reply
#4
check out: https://stackoverflow.com/a/2180841
Reply
#5
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  xml file editing with lxml.etree FlavioBueno 2 681 Jun-09-2023, 02:00 PM
Last Post: FlavioBueno
  Regarding file editing dan86 12 2,552 Jun-29-2022, 07:13 PM
Last Post: dan86
  python one line file processing har 4 3,259 Dec-09-2019, 06:10 AM
Last Post: har
  Trouble processing file villumanati 1 1,631 Jul-30-2019, 04:17 AM
Last Post: Larz60+
  Error is wave file processing vipinv23 1 2,947 Jan-18-2019, 02:17 PM
Last Post: Larz60+
  Enable & Disable Wireless connection by using python aniyanetworks 9 18,257 Jan-15-2019, 04:32 AM
Last Post: aniyanetworks
  Parsing and Editing a Structured Text File norsemanGrey 1 2,428 Jul-11-2018, 09:51 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020