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

Automate the ability to add PDF's to an existing Index?

Enthusiast ,
Jun 23, 2018 Jun 23, 2018

Copy link to clipboard

Copied

Hello!


I am trying to find a way to have an Index automatically add new PDF files once added to a folder? Is this possible?

I am trying to get companies to use the Index feature more, but everyone has the same issue. Great at starting it, not great at adding the new ones to rebuild the existing Index. So, I am trying to find a way to automate that process.

Any thoughts, suggestions or guidance here?

Cheers,

babs

TOPICS
Acrobat SDK and JavaScript

Views

1.0K

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 1 Correct answer

Community Expert , Jul 17, 2018 Jul 17, 2018

Hi,

Just looking at the screen shot, you appear to be missing a quote on the following line

do script "myIndex = catalog.getIndex('/Users/barbarapress/Desktop/Training_Files.pdx)"

// which should be

do script "myIndex = catalog.getIndex('/Users/barbarapress/Desktop/Training_Files.pdx')"

// note the single quote before the closing bracket.

Hope this helps, if not will take another look

Malcolm

[Edit, fixed typo]

Votes

Translate

Translate
LEGEND ,
Jun 24, 2018 Jun 24, 2018

Copy link to clipboard

Copied

If you can leave a computer constantly on, you could create a JavaScript that runs a script the uses the  setIntervalt to run at a determinal time a script to build the index. Not a simple JavaScript tsk.

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
Enthusiast ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Thank you for your reply.

At least I know it can be done.

I will continue to research this.

Probably need to hire someone to write the script to automate.

Thank you!

babs

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 ,
Jun 26, 2018 Jun 26, 2018

Copy link to clipboard

Copied

Hi,

which platform are you on? Windows or mac? As you could probably just automate the rebuilding of the index if the pdf’s are all stored in the same folder or folders?

Regards

Malcolm

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
Enthusiast ,
Jun 27, 2018 Jun 27, 2018

Copy link to clipboard

Copied

Hello,
Thank you for your reply,..,.

I am on a Mac.
Yes, can definitely rebuild the index, which is exactly what I have been doing.

Would love to find a way to have it rebuild atomically each time one or more PDF's are dropped into the folder.

I don't know javascript, was more inquiring if that is possible at all.

May look to hire someone to help with this option, but will try and figure out what I can on my own, before going that route

thanks!!!
babs

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 ,
Jul 07, 2018 Jul 07, 2018

Copy link to clipboard

Copied

Hi,

I believe you should be able to use the Automater (application) to have this done for you automatically.

If you create a new workflow in Automater.

Select "Folder Action"

automater.png

Then Drag "Run AppleScript" from the second list

automaterApplescript.png

Then place this Applescript in the area that appears, changing the path name to match your folder location ( this might be computer specific in which case we can revisit, but best to check it works first)

tell application "Adobe Acrobat"

    set myIndex to ""

    set myResult to ""

    do script "myIndex = catalog.getIndex('/PATH/TO/INDEX/FILE/HERE.pdx)"

    do script "myResult = myIndex.build('', false)"

end tell

That should rebuild the index every time a file is added to the folder,

Hope this helps, sorry about the delay took me longer to get to it than I expected.

Malcolm

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
Enthusiast ,
Jul 07, 2018 Jul 07, 2018

Copy link to clipboard

Copied

Hi Malcolm,

This is terrific...I actually had looked at automator, but could not figure it out.
I am in my home office tomorrow and will try this.

I will let you know how I make out.

Thank you so much!!!!

Babs

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
Enthusiast ,
Jul 16, 2018 Jul 16, 2018

Copy link to clipboard

Copied

Hi Malcolm,

So sorry for the late reply.

I was not successful and have gone back a few times, but still struggling to get this to work.

I am not that familiar with either Automator or AppleScript, have done a little in both, but nothing too complex.

This was my last attempt, but I keep getting stuck in the AppleScript in Automator.

To test it, I placed a folder on my Desktop and named it Index_Adobe - I dropped a few PDF's in there.

I then Created a Index File in Acrobat and named it Training_Files.pdx - this is the Index I would want to try and rebuild each time I place PDF files inside of the Index_Adobe Folder.

I opened up Automator and started a NEW Folder Action.

Here is my script:

.............

te

Screen Shot 2018-07-16 at 1.15.46 PM.png

I feel like I tried every sequence, but I just can't get anything to work.

Would you mind looking at this and give me some guidance. I am sure with a little help, I will have success!!

Thank you!Babs

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 ,
Jul 17, 2018 Jul 17, 2018

Copy link to clipboard

Copied

Hi,

Just looking at the screen shot, you appear to be missing a quote on the following line

do script "myIndex = catalog.getIndex('/Users/barbarapress/Desktop/Training_Files.pdx)"

// which should be

do script "myIndex = catalog.getIndex('/Users/barbarapress/Desktop/Training_Files.pdx')"

// note the single quote before the closing bracket.

Hope this helps, if not will take another look

Malcolm

[Edit, fixed typo]

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 ,
Jul 17, 2018 Jul 17, 2018

Copy link to clipboard

Copied

Only the "D" in getInDex must be lower-case...

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
Enthusiast ,
Jul 19, 2018 Jul 19, 2018

Copy link to clipboard

Copied

LATEST

Hi Malcolm !!

IT WORKS!!!!

Took me a little to figure out how to attach the Folder Action, as I did not see that initially in automator.

This is great!

Thank you SO much!

Babs

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