Any suggestions for shrinking a PDF file?

后端 未结 10 808
名媛妹妹
名媛妹妹 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:17

    Aside from using another library, your best bet is to get your library working right. Some suggestions on your other post - I'm not sure of any 'post process' that you would want to run to compress down the file.

    As an aside, does your webserver allow HTTP gzipped content? Transparent to the end user!

    (That being said, short PDF files should be pretty impervious to most compression methods - images should be compressed during rendering (and JPEG >> ZIP in this case) - but if you have a lot of text, gzip can help)

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

    If you're interested in lossless compression, try my tool Precomp and a file compressor of your choice. Depending on what contents are in your PDF file, Precomp usually enlarges your PDF file so it can be compressed much better afterwards.

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

    There are multiple flavors of PDF with different size functionality trade-offs. If you are converting text-based documents (word/excel/etc) versus image documents (TIFF/JPG/BMP/etc) then it would probably explain the smaller file sizes that distiller gives you. You need to make sure your utility is not just creating Image-only PDF files (which a typically much bigger) out of everything. Also the compression format is very important ESPECIALLY for color documents. Look for configuration options that allow you to tweak those settings. If you mention the specific PDF builder tool we might be able to give you more specific help on that.

    Here is a decent reference on the "flavors" of PDF files:

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

    File a bug with the maker of your pdf library? If it's open source, fix a couple of the low hanging fruit (there are probably many) and submit a patch?

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