| 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.
|
||
Showing messages 1 through 1 of 1.
-
Compressing PDF output
2008-11-08 22:59:37 corlettk [View]



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.