Copy link to clipboard
Copied
Hello, I am a complete beginner with javascript and need help with creating a script in Acrobat DC. Maybe someone can help me 🙂
I have several 1,000 pdf documents with varying numbers of pages. However, all documents contain a specific text that only appears once in the document, but on a different page in each document.
I would like to use a script to find the page with the specific text and then delete all pages after this page.
Example:
Total number of pages: 125
Specific text: "Document attachment"
Number of pages with specific text: 27
Task:
Delete pages 28 to 125
It would be great if someone could help me with a script that does this task.
Many thanks in advance
Copy link to clipboard
Copied
The best way to do that is in an Action. You can use the Search & Remove text command to locate the text and mark it for redaction. Then you use a script to locate those Redaction comments and delete the pages they are on. The latter has to be done from the last page backwards, though.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now