JS - Executes a menu command in Acrobat Pro

Post Reply
Frank0
Newbie
Posts: 3
Joined: Thu Jul 18, 2019 8:22 am

JS - Executes a menu command in Acrobat Pro

Post by Frank0 »

Hi,
I need a javascript that executes a menu command in the Adobe Acrobat Pro app ('Reduce file size' when saving).

We use Acrobat Pro as a connector in Switch and the script should execute the menu command.

Can anyone help me with this?

Many thanks

Frank
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: JS - Executes a menu command in Acrobat Pro

Post by jan_suhr »

This requires that you run a Script in Acrobat, not in Switch

In the Acrobat configurator you can in the Command property set it to "Use script" and that is a script that runs in Acrobat.
You can probably find such a script if you search the web, note that there are a few special things when running an Adobe script in Switch, the Switch documentation describes how to do it.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
loicaigon
Advanced member
Posts: 357
Joined: Wed Jul 10, 2013 10:22 am

Re: JS - Executes a menu command in Acrobat Pro

Post by loicaigon »

Hi,

I can't find any available method in the Adobe Acrobat JS API to reduce file size. Once that said, have you tried the built-in "Optimization" property in the PitStop Server configurator? You also have the ability to create your own action list to dramatically reduce file sizes.

I understand it's not your request but if you tried the above technique and somehow got unsatisfied, I would be interested in knowing why exactly.

HTH

Loic
Frank0
Newbie
Posts: 3
Joined: Thu Jul 18, 2019 8:22 am

Re: JS - Executes a menu command in Acrobat Pro

Post by Frank0 »

Hello Jan, Hello Loic,
thanks you for your answers.

@Jan - ok, then I have to insert the command in Acrobat. I would have thought that I could give that in Switch to the Connector and it will run it in Acrobat. But, ok

@Loic, I had used a (default) action list, but it didn't give me the size I needed. And in the 'Optimize PDF' action list is already pretty much everything in there. Only in Acrobat itself, you come with the save (reduce file size) even further down.

Thanks
Frank
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: JS - Executes a menu command in Acrobat Pro

Post by laurentd »

As far as I know, "reduce file size" is not available in Adobe Acrobat JS (ExtendScript).
You can use a PitStop Action list as Loic suggests.
There is also an app in your favorite Appstore, called Optimize PDF.
Give it a try!
Laurent De Wilde, Solution Architect @ Enfocus
Post Reply