Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a 72.9MB pdf file that I need to shrink into under 500KB.

The file was a jpeg image that I had scanned, and then converted to pdf.

Can someone please offer any suggestions?

share|improve this question
it depends on what consumes the space...need a lot more information. compressing image space could help, but if you're trying a large file heap spray, that won't work. seriously need more info. – Call me V Mar 16 '12 at 17:14
convert it to DjVu, instead trying to reduce to impossible sized PDF (according source) – zetah Mar 16 '12 at 17:22
the file was a jpeg image that I had scanned, and then converted to pdf. – tamimym Mar 16 '12 at 19:53
It only seems to help filesize a little bit, but pdfopt has a simple syntax and improves loading and page-turning speed in the iPad era. :-) – Ari B. Friedman May 31 '12 at 0:53
1  
PDF to PS is not effective in scanned PDF file, I try to convert 56 MB pdf into ps file but ps file convert into 1.3 GB and again ps2pdf is converted in 45 MB file – Nikunj Jan 18 at 5:32
show 3 more comments

4 Answers

up vote 13 down vote accepted

aking1012 is right. With more information regarding possible embedded images, hyperlinks etc.. it would be much more easier to answer this question!

Here are a couple of script and command-line solutions. Use as you see fit.

share|improve this answer
1  
I should point out that if you're trying to downsize a >10MB PDF file to under 500KB, you'll be sacrificing a lot of content, because its strongly unlikely you'll be able to get that PDF down to the size you want... – The Lord of Time Mar 16 '12 at 17:31
Thank you very much for your suggestions, the ghostscript shell worked wonders and shrank it down to 460KB :) – tamimym Mar 16 '12 at 19:56
You are very welcome tamimym, and i am glad, that one of the suggestions fitted your needs!! (: – v2r Mar 16 '12 at 20:55

Use the following ghostscript command:

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Leave out the -dPDFSETTINGS=/screen setting for better quality, but slightly larger pdfs.

share|improve this answer
One can also make a Nautilus script to access this function for every file. – Sina May 7 at 15:51

My favorite way to do this is to convert the pdf to ps and back. It does not always work, though, but when it works the results are nice:

pdf2ps input.pdf output.ps
ps2pdf output.ps output.pdf

Good luck

share|improve this answer
This is a very simple and effective way to do it. I was surprised to see how much this method compressed the files. Thanks you! – Gabriel Apr 8 at 12:59

Vectorizing all fonts will help. Don't embed fonts into the file.

Use small image resolution: most of the time you really dont need HD pictures. Be careful with image software like Gimp, it can make very large compressed file (beware how you compress it). I don't like proprietary softwares but some Adobe Photoshop compression tools are better than Gimp one.

More: do you need to put the image into a PDF file?

It's very simple, but more than image resolution, you can simply change the document size...

@Lord of Time is right: switch from 72Mo to 500Ko will be hard without changing something radically.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.