Skip to main content
Participating Frequently
January 20, 2022
Question

Compress a PDF by C#.

  • January 20, 2022
  • 3 replies
  • 2038 views

Hi.

I want to compress a PDF by C#.
Please tell me three questions.

 

1. Acrobat SDK can compress a PDF by C#?
I want to sample source code.
2. Can I try it for free?
3. If use Acrobat SDK, I think need Acrobat application.
So, what do you need, Acrobat Pro or Acrobat Standard?

 

Thank you.

This topic has been closed for replies.

3 replies

Thom Parker
Community Expert
Community Expert
January 20, 2022

What you want is a PDF Library that can be licensed for the server and is capable of low level PDF operations.  There's aren't many of those. 

The Officail Adobe SDK is sold by DataLogics

https://www.datalogics.com/products/pdf-sdks/adobe-pdf-library/?gclid=Cj0KCQiAraSPBhDuARIsAM3Js4onLACcuoL1UZupL6qz3_EOclrRBeBmvrc7qrElIIiZB5o5WCk32bgaAsAtEALw_wcB

 

However, PDF is not like a raster image format. It uses a vector graphics language for page content. So the visual quality can't be traded off for size. I'd suggest you read the PDF Specification - ISO 32000

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Legend
January 20, 2022

Doi you want to run this on a server, or for a single user who will run this manually in an interactive session, or something else?

What exactly do you mean by "compress"? Do you mean "reduce quality to make the file size smaller", or "reduce the page size", or something else?


The Acrobat SDK is a tool for automating Acrobat, so Acrobat is required. You can only automate functions in the version of Acrobat you buy. Some functions need Pro, especially the "PDF Optimizer". 

Legend
January 20, 2022

Sorry, I missed your postscript. Acrobat cannot be used on a web server. It is not technically suitable (it is interactive and pops up messages) and the license forbids it.

 

Adobe have a suite of web APIs which may interest you. 

Info Adobe PDF Services | PDF Tools APIs | Adobe Document Services - Adobe Developers

Forum Document Services APIs - Adobe Support Community

Participating Frequently
January 20, 2022

Thank you for reply.

 

I want to run on a server.
compress mean is reduce quality to make the file size smaller.
If Adobe have other products, please let me know.

Participating Frequently
January 20, 2022

postscript.

4. I want to run in WebServer.

Acrobat SDK can run WebServer?