Page 1 of 1

Compress a PDF (in Mbs) to smaller size(in Kbs) in .net

Posted: 2017-04-29T20:49:59-07:00
by roshan1109
Hi Team,

I am using ImageMagic dll. I have a simple need.

I have a PDF generated by my system, which is around 2.9MB but I want to compress it down to not more than 500kb. Can I get a approach on the same from the team here?

TIA,

Roshan

Re: Compress a PDF (in Mbs) to smaller size(in Kbs) in .net

Posted: 2017-04-29T21:21:48-07:00
by snibgo
What version IM? I assume v6.

IM is a raster image processor. It can read PDF files, but converts them into raster (pixel) images. So it can do the job, but you may not like the result.

I don't use Magick.net. I suggest you prototype with a command first.

Code: Select all

convert input.pdf -format JPG -quality 10 output.pdf
The result may be a small file, but horrible quality. Increase the "-quality" setting towards 100 for better quality but larger files.