Any suggestions for shrinking a PDF file?

后端 未结 10 807
名媛妹妹
名媛妹妹 2021-02-03 11:34

We\'ve got a .net 2.0 web system that dynamically builds pdf files. Some of these files can get pretty large - 12MB+. While processing time isn\'t a factor, really, the size

相关标签:
10条回答
  • 2021-02-03 12:03

    If your pdf library is making sub-optimal PDFs then loading and saving the PDF in any other library ought to give you smaller files. PDFNet SDK Type 3 should be up to this task and at 360USD is cheaper than Adobe PDF library.

    0 讨论(0)
  • 2021-02-03 12:06

    I don't have a specific answer to your question, so I hope that my response is not poor form.

    I've used pdftk for a variety of PDF-related tasks. It's easy to use from the shell and I see that it does have a compression feature. You could try it out quickly to see if it's something that would work for post processing for your application.

    0 讨论(0)
  • PDF's usually use JBIG/JBIG2/JPEG2000 compression. Cvision's PDFCompressor is the best for compressing PDF's.

    0 讨论(0)
  • 2021-02-03 12:08

    Apago have lots of tools for 'tidying up' PDFs

    http://www.apagoinc.com/

    0 讨论(0)
  • 2021-02-03 12:10

    Use Ghostscript, which is also available for the 32bit and 64bit Windows platforms. It recognises all Adobe Distiller parameters[1] and honors most of them. On top of that, you can inject PostScript programs into the conversion process. I use it for a year now in a pre-print production environment on image-heavy PDFs. If the parameters are set correct, the file-size can go from 40MB down to 800kB with no visible loss of quality. I found it to be quite fast, in fact the documentation states that it may be faster than Adobe Distiller.

    And it is free (as in beer as well as in speech).

    [1] See distparm.pdf in the help folder of Distiller or look here.

    How you use it

    You call it from the command line with all your wanted parameters, input and output-files and you're done.

    Quick example:

    gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite\
       -dCompatibilityLevel=1.3 -dEncodeColorImages=true\
       -sOutputFile=output.pdf input.pdf
    

    Some valuable resources:

    • Ghostscript PDF writer tips
    • Postscript-to-PDF converter documentation
    0 讨论(0)
  • 2021-02-03 12:11

    Don't include entire fonts in the PDF. Taking care of that one can save a few megabytes.

    0 讨论(0)
提交回复
热议问题