Skip to main content
Participant
December 14, 2017
Answered

How to use Adobe optimization API

  • December 14, 2017
  • 2 replies
  • 824 views

May I know to to user Adobe optimization API to optimize multiple pdf files in one batch.

If possible, please show the source code.

Step 1: Open the folder which multiple pdf files exist

Step 2: Optimize these pdf files and output into the destination folder

Thanks in advance.

This topic has been closed for replies.
Correct answer Thom Parker

In Acrobat DC a Batch Sequence is called an Action.  And it is built from a series of "Commands".

There is an API In the Acrobat SDK for creating batch commands.  The Batch Command is registered with a data structure that contains a set of call backs, Once registered it will appear on the Commands list in the "Actions" control panel.

Of course, you can already create an "Action" to optimize a whole folder of PDFs without writing your own Batch Commands.

See this article:

https://acrobatusers.com/tutorials/create-custom-action-acrobat-x

2 replies

Thom Parker
Community Expert
Thom ParkerCommunity ExpertCorrect answer
Community Expert
December 14, 2017

In Acrobat DC a Batch Sequence is called an Action.  And it is built from a series of "Commands".

There is an API In the Acrobat SDK for creating batch commands.  The Batch Command is registered with a data structure that contains a set of call backs, Once registered it will appear on the Commands list in the "Actions" control panel.

Of course, you can already create an "Action" to optimize a whole folder of PDFs without writing your own Batch Commands.

See this article:

https://acrobatusers.com/tutorials/create-custom-action-acrobat-x

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
December 14, 2017

There is no API for batch. You need to read the directory in your own code and open each file in turn. Which optimisation API do you plan to use, and which part of the documentation is not clear? Please don’t ask us to write your code.