Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Are there any open-source command line tool for optimizing PDF in Ubuntu. I have used Ghost Script and i am able to convert the PDF into 72 dpi,

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

But what i would like to do is mention what dpi i want to convert the pdf to, like a 300 dpi pdf file to 90 dpi pdf file.

share|improve this question

migrated from stackoverflow.com Sep 28 '11 at 12:17

This question came from our site for professional and enthusiast programmers.

    
Welcome to Ask Ubuntu! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. –  N.N. Sep 28 '11 at 12:26
    
Maybe you should rephrase your question since optimizing pdfs might be confused with linearizing them which is not what you're asking for. –  N.N. Sep 28 '11 at 12:27
    
Please see this related Q&A for a number of GUI tools that can help you with optimizing your PDF files. –  Glutanimate Apr 11 '13 at 21:37
add comment

1 Answer

I'll quote zweifel's comment on http://www.ubuntugeek.com/ubuntu-tiphowto-reduce-adobe-acrobat-file-size-from-command-line.html:

  • dPDFSETTINGS=/screen (screen-view-only quality, 72 dpi images)
  • dPDFSETTINGS=/ebook (low quality, 150 dpi images)
  • dPDFSETTINGS=/printer (high quality, 300 dpi images)
  • dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs)
  • dPDFSETTINGS=/default (almost identical to /screen)

More options and fine tunning on the site: http://milan.kupcevic.net/ghostscript-ps-pdf/

Thus you should use either the option dPDFSETTINGS=/printer or the option dPDFSETTINGS=/prepress to get 300 dpi.

share|improve this answer
    
Unfortunately, this will not replace multiple instances of the same graphic with a single reference. –  vy32 Nov 6 '13 at 22:27
add comment

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.