Skip to main content
Participant
February 8, 2024
Question

Programmatically compressing/optimizing a PDF on a Windows machine using .Net, python or cmd

  • February 8, 2024
  • 1 reply
  • 1550 views

The following page stongly suggests that there are three ways to do this: https://opensource.adobe.com/dc-acrobat-sdk-docs/. See "Compress documents" in the Feature Comparision table. It looks like you can do it via DC, PDFL or Acrobat SDKs. I have Acrobat Standard installed on this computer. .Net is my preferred route, but I can use Python or execute a command line program from either of those. Is this possible? 

 

If a .Net approach is available, what references do I have to add to my project (which specific assemblies/DLLs)? Ideally someone could provide a *complete* code example. I don't necessarily need to fine tune the compression. I just need functionality very similar to manual "Optimize PDF" in Acrobat Standard.

 

I would like to stay within the Adobe 'ecosystem' and not rely on some third part that may come with issues or unnacceptable (low quality/resolution) output files.  

 

Thanks!

This topic has been closed for replies.

1 reply

BarlaeDC
Community Expert
Community Expert
February 12, 2024

Hi,

 

I know this is not keeping inside the Acrobat Standard eco-system but it is staying inside the above eco system you could use this API -

https://developer.adobe.com/document-services/docs/overview/pdf-services-api/howtos/compress-pdf/

Participant
February 12, 2024

Thanks! I was looking for a free option but I think we may stay  in the Free Tier since we probably won't exceed 500 documents per month . It sounds like compressing PDFs would be included in the "all 15+ PDF Services"  part. Can anyone confirm?

BarlaeDC
Community Expert
Community Expert
February 13, 2024

Hi,

 

yes it is