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

Rearranging pages in Acrobat by specific keywords in the text

Community Beginner ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Thanks in advance for help anyone can give. I'm trying to figure out how to rearrange pages by keywords already in the text. For example: We have a PDF with 100 invoices for band books and want to arrange them by instrument. Using the search function, I can find every place the word "Flute, or Trumpet" appears, but I'm hoping to find a way to search for "Flute" and then move those pages together to the top of the PDF. Repeating this for each instrumentation until all 100 pages are rearranged in the order we need.

 

The only way I know of to rearrange pages, is by selecting each thumbnail (either in the thumbnail preview bar at the side, or in the "organize pages" function) and manually moving them into place. A few searches I've done lead me to think I need to use some sort of Script? I'm still in the learning phase, and don't understand yet what that means. 

TOPICS
Acrobat SDK and JavaScript

Views

9.1K

Translate

Translate

Report

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

correct answers 2 Correct answers

Community Beginner , Dec 16, 2019 Dec 16, 2019

You're Awesome!! That's exactly the action I was picturing being able to do! 

Votes

Translate

Translate
Community Expert , Apr 27, 2022 Apr 27, 2022

Hi,

Here is a new file with an action wizard and a field with the script.

Previously I told you somethin wrong ("In this script the word is used as a variable"). This is something I though to do but I didn't. So you can look for "2 Black Titans"... and you can (normally) search from 1 up to several numbers of words.

@+

 

Votes

Translate

Translate
Community Expert ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Hi,

If you know the position of the word you are looking for (in a title at the top of the page for example), you can check it with a script then store the page numbers and then re-arrange the position of the pages of your document.

This is something I already did.

@+

 

Votes

Translate

Translate

Report

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 Beginner ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

I know nothing about what JavaScritpt does, and how to use it function in Acrobat. Any reccommendations for video tutorials would be wonderful. I haven't had much luck just playing around with it in some of my practice documents. The keywords I would like to search and sort by, aren't always located in the same position on each page. Does this matter. 

 

Sorry in advance, my questions may be pretty basic. 

Votes

Translate

Translate

Report

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 ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

So you can check all the pages where are located the word you are looking for...

Is it feasible?

@+

Votes

Translate

Translate

Report

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 Beginner ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Sorry, I think this is above my understanding and current capabilities. Unfortunately all the tutorial videos I've found on how use or encorporate a script in Acrobat, are YEARS old, and are demonstrated on very old versions of Acrobat. I'm really starting from zero here. Thanks so much for trying to help me, I apparantly need to learn A LOT more. 

Votes

Translate

Translate

Report

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 ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Scripting on Acrobat hasn't changed in Years. Only the UI buttons have moved around. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
New Here ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

Thom my name is Gail Nikol and I have a client that needs the type of work done that has been discussed in this chain.  I am retiring and I am not up for learning more software.  He has a 600 page document with Job Descriptions, Checklists, Workflows and SOPs and wants to make it easy for himself to search the document when he needs various documents for keywords (i.e., Technician, Electrical Engineer, Service, etc.  I would like to have a further discussion with you on this.  He has asked that I find a person that can write the scripts for his needs.

Would you be able to work with us on this project?  If not can you refer me to someone?

My contact information:

[Private info removed by moderator]

Thank you in advance for your consideration

Votes

Translate

Translate

Report

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 ,
Jan 11, 2022 Jan 11, 2022

Copy link to clipboard

Copied

Hello Gail,

    I just sent you an email. I'd strongly suggest you edit the post to remove your contact information. 

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
New Here ,
Jan 14, 2022 Jan 14, 2022

Copy link to clipboard

Copied

This is the first time I posted. How do I edit the post Thom?


Gail L. Trugman Nikol

Gail L. Trugman-Nikol, President
Unique Business Solutions, Inc.
P.O. Box 7777, Hicksville, NY 11802-7777
(P) 516 - 935-5641 (F) 516 - 935-4101 (Cell) 516 - 713-6325
www.ubsassociates.com

[LI] [Facebook] [google-plus-icon-transparent-png]

Votes

Translate

Translate

Report

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 ,
Jan 15, 2022 Jan 15, 2022

Copy link to clipboard

Copied

For your own post there is a "More..." link at the bottom right.  Click on it to get a popup menu with an "Edit" option. 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
New Here ,
Feb 05, 2021 Feb 05, 2021

Copy link to clipboard

Copied

Hi, I am currently trying to redorder pages based on names found within each page so I can alphabetize my document. I wrote a script that can find the word I am looking for and it stores the word and page number in an array of objects. I can see the my search and sort has been successful when console.println my new array. however, using the this.movePage function to move the actual pages based off of my alphabetized array has proven tricky since the page numbers are dynamic and moving one reorders the current document. Do you have a better suggestion on how to move the pages successfully? TLDR: I have an array sorted how I want my document sorted but can not successfully move the pages using the script I wrote.

Votes

Translate

Translate

Report

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 ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Creating scripts to finding words on a page, and then rearrange those pages is possible, but it is an advanced task. To create a complete solution you'll neet to either learn Acrobat scripting or engage a developer. 

 

There are some free tools that may help you. You'll find a list of free "Acrobat Actions" here:

https://acrobatusers.com/actions-exchange

 

The very last one finds and highlights words. This at least gets you part of the way. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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 Beginner ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

Thanks for your help - I downloaded this action, and unfortunately it does the same thing that the basic search function already does in Acrobat and adds a highlight. Maybe the action I am trying to execute doesn't exist.

Votes

Translate

Translate

Report

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 ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

you apparently know how to launch an action!

I already did something similar, so I'll come back to you soon.

@+

 

Votes

Translate

Translate

Report

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 ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

What you are asking about is a complex custom sequence of tasks. Find specific words on pages, then arrange in a specific way based on sepcific words. Automating this process requires a custom script. There are not built in or off the shelf tools that will do this.

 

So, while the Acrobat search  finds words, there is no way to do anything with that data. It is in the find tool only, and not accessible to any other tools in Acrobat.

 

The Find and highlight Action marks the pages with the highlight annotation, so now you have something that a script can use. It's a starting point, not the end. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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 ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

the time I translate the action...

please load the action:

https://we.tl/t-Gl0bBsXgHa

and let me know if that suit to you.

@+

 

Votes

Translate

Translate

Report

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 Beginner ,
Dec 16, 2019 Dec 16, 2019

Copy link to clipboard

Copied

You're Awesome!! That's exactly the action I was picturing being able to do! 

Votes

Translate

Translate

Report

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 ,
Jan 13, 2022 Jan 13, 2022

Copy link to clipboard

Copied

HI @bebarth 

 

Can you post your solution in someway that would help anyone else coming to this thread and looking for an anwer, even if it is just a description of how you did it.

Votes

Translate

Translate

Report

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 ,
Jan 13, 2022 Jan 13, 2022

Copy link to clipboard

Copied

Hi,

Attached in this pdf file you will find the wizzard action I shared at that time.

@+

 

Votes

Translate

Translate

Report

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
New Here ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Are you able to repost this? It is a blank screen.

Votes

Translate

Translate

Report

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 ,
Jan 28, 2022 Jan 28, 2022

Copy link to clipboard

Copied

Hi,

The page is blank because there is only an attached wizzard action!
Here is a new one with a text field including the script.

Let me know if it suits to you, else I can supply an other one which extract or delete pages with up to 5 words...

@+

 

Votes

Translate

Translate

Report

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
New Here ,
Feb 20, 2022 Feb 20, 2022

Copy link to clipboard

Copied

Hi I'm sorry to ask but, can you make it so it detect the field inside the document and sort it numerically from smallest to largest?

Votes

Translate

Translate

Report

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 ,
Feb 21, 2022 Feb 21, 2022

Copy link to clipboard

Copied

quote

Hi I'm sorry to ask but, can you make it so it detect the field inside the document and sort it numerically from smallest to largest?


By @Pristian232550956qoh

 

Do you want to learn how to do this? or just have someone do it for you?

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

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
New Here ,
Apr 24, 2022 Apr 24, 2022

Copy link to clipboard

Copied

Can we edit this script to sort the PDF file according to 3 different choices?

Like if we have word "Titans" all pages should be first, then "Origin" and then "Snap" in the same PDF file. Is that possible, if yes how? 

Kindly, I need your help if you can. Thanks!

 

Votes

Translate

Translate

Report

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 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

Hi,

You will find an action wizzard and the script in the attached file.
If you wish more or less words, you just have to modify the "theWords" table.

var theWords=["Titans","Origin","Snap"];

@+

Votes

Translate

Translate

Report

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