Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

extract pages from PDF based on keywords

Community Beginner ,
Apr 16, 2024 Apr 16, 2024

I have a list of keywords, and I need to extract all the pages from the PDF that contain one of the keywords. In other words, if a page does not contain at least one of the keywords, then delete it. I have a functioning Javascript that works for one keyword, but I can't figure out how to add more keywords or phrases. 

looking to execute in action wizard.

 

Please help!!

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Apr 16, 2024 Apr 16, 2024
LATEST

You should use the Action Wizard's built-in Search & Remove Text command. This will allow you to enter a list of keywords that will then be marked up by this function. A script can then be used to iterate over all the pages in the file, checking each page for these Redaction annotations. If none are found, delete the page. When done, delete all these annotations.

A few things to keep in mind, though:

- Make sure to iterate over the pages backwards, from the last one to the first, since you're going to be removing them.

- Make sure you don't try to delete all the pages in the file, as that would cause an error, of course.

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2024 Apr 16, 2024

in the future, to find the best place to post your message, use the list here, https://community.adobe.com/

p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post (like this one has already been moved) if it helps you get responses.



<"moved from using the community">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 16, 2024 Apr 16, 2024
LATEST

You should use the Action Wizard's built-in Search & Remove Text command. This will allow you to enter a list of keywords that will then be marked up by this function. A script can then be used to iterate over all the pages in the file, checking each page for these Redaction annotations. If none are found, delete the page. When done, delete all these annotations.

A few things to keep in mind, though:

- Make sure to iterate over the pages backwards, from the last one to the first, since you're going to be removing them.

- Make sure you don't try to delete all the pages in the file, as that would cause an error, of course.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines