title: How to downsample images within PDF file?
body: <p>Need a Java-based solution or, at the worst, command-line for Linux.</p>
  
  <p>I tried to use Ghostscript:</p>
  
  <pre><code>gs -sDEVICE=pdfwrite -dPDFA -dBATCH -dNOPAUSE -dUseCIEColor \
     -sProcessColorModel=DeviceCMYK -sPDFACompatibilityPolicy=1 \
     -sOutputFile=downgraded.pdf leon_range_my12_w22_brochure.pdf
  </code></pre>
  
  <p>but I got a lot of errors...</p>