Skip to main content
Participant
May 24, 2017
Answered

C# Is it possible to run PDF Optimizer programmatically?

  • May 24, 2017
  • 1 reply
  • 1732 views

Is it possible to run PDF Optimizer programmatically from within C# application? If it is, would you mind pointing me at the right direction (reference, library)?

I've spent whole day researching this issue with no success. Any help is much appreciated.

What I'm doing is checking files for user-specified errors, then re-saving them with some changes. I was able to proceed this far with Acrobat Type Library. Unfortunately, the last step is to optimize files, that wouldn't pass yet another test with user-specified PDF Optimizer settings. I wasn't able to find any useful information on how to do this.

Thanks for any help.

This topic has been closed for replies.
Correct answer Geroj

It can be done from an Acrobat plugin (which are written in C/C++)


Hi Irosenth,

thank you so much for help, you point me in right direction.

I've eventually came up with workaround using Preflight ('plugin'). You can set most of the options available in PDF Optimizer there. Then it was just a matter of creating droplet and calling it from my method. It's really clunky and not backwards compatible though.

I realise it's bad practice, but in case anyone is looking for solution to similar issue I thought I should share. 

1 reply

lrosenth
Adobe Employee
Adobe Employee
May 24, 2017

Not it is not.

GerojAuthor
Participant
May 25, 2017

Hello Irosenth,

thank you for your answer. Would you mind giving me some advice? Is it not possible at all, or is it just not possible with C# app? If it is possible through another language, could you give me some pointers?

I guess it can be achieved by opening actual Acrobat window and simulating user interaction, but that is the last resort approach.

lrosenth
Adobe Employee
Adobe Employee
May 25, 2017

It can be done from an Acrobat plugin (which are written in C/C++)