Women in Technology

Hear us Roar



Article:
  Two Servlet Filters Every Web Application Should Have
Subject:   Compressing PDF output
Date:   2004-01-25 20:44:15
From:   jfalkner
Response to: Compressing PDF output

Yes, you certainly can send PDF through a compression filter. However, I am unsure if PDF is compressed already, in which case you would likely be wasting server power compressing it again.


Is anyone a PDF expert, is it beneficial to ZIP compress a PDF document?

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Compressing PDF output
    2008-11-08 22:59:37  corlettk [View]

    As you suspect, PDF is "pretty solid" already.

    In fact PDFs main difference with its precursor, PostScript, is its lightweight data structure (less wasted space) and the internal use of several compression algorithms including RLE & LZW... so GZipping most PDF's doesn't reduce there size very much at all.

    BUT... PFDs are by nature "static content", so if you combine compression with response caching (especially of very large documents) you could be onto a winner... On the downside, I suspect some browsers won't recognise compressed-PDF, they'll see Content-Encoding "application/pdf" and ignore the additional "gzip". Life's a gamble ;-)

    More here: http://www.verypdf.com/pdfinfoeditor/compression.htm

    Cheers. Keith.