[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFH: non-blocking desktop conforming viewer



On 06/08/2012 13:09, Reinhard Tartler wrote:
> On Mon, Aug 6, 2012 at 10:25 AM, Norbert Preining <preining@logic.at> wrote:
>>>> * forget about compressed documentation
>>>>   PDF since format 1.4 has internal compression, meaning that
>>>>   the other compression does not win a lot at all
>>>>   We could advise packagers to use dh_compress -X.pdf

Sounds quite reasonnable to me. Just tested with the files in question:

% ls -lh beameruserguide.pdf* pgfmanual.pdf*
-rw-r--r-- 1 mpg mpg 1,5M août   6 13:44 beameruserguide.pdf
-rw-r--r-- 1 mpg mpg 5,1M août   6 13:41 pgfmanual.pdf
% gzip beameruserguide.pdf pgfmanual.pdf
% ls -lh beameruserguide.pdf* pgfmanual.pdf*
-rw-r--r-- 1 mpg mpg 1,4M août   6 13:44 beameruserguide.pdf.gz
-rw-r--r-- 1 mpg mpg 4,9M août   6 13:41 pgfmanual.pdf.gz

Is a 5% or 7% gain in size really worth the trouble?

> Well, lossy compression (such as done by imagemagick's convert tool or
> ghostscript) may or may not be "dangerous", however, lossless
> compression (such as done by pdftk or qpdf) should do fine. But I do
> not claim particular PDF expertise, so maybe others can comment.
> 
pdftk compression isn't as good as the original compression of the pdf files
created by (recent versions of) LaTeX (with pdfTeX), and qpdf does not seem to
change the compression level.

% pdftk beameruserguide.pdf output beamer-pdftk.pdf compress
% pdftk pgfmanual.pdf output pgf-pdftk.pdf compress
% qpdf --stream-data=compress --object-streams=generate --min-version=1.5
pgfmanual.pdf pgf-qpdf.pdf
% qpdf --stream-data=compress --object-streams=generate --min-version=1.5
beameruserguide.pdf beamer-qpdf.pdf
% ls -lh beamer*.pdf
-rw-r--r-- 1 mpg mpg 2,2M août   6 13:57 beamer-pdftk.pdf
-rw-r--r-- 1 mpg mpg 1,5M août   6 14:02 beamer-qpdf.pdf
-rw-r--r-- 1 mpg mpg 1,5M août   6 13:44 beameruserguide.pdf
% ls -lh pgf*.pdf
-rw-r--r-- 1 mpg mpg 5,1M août   6 13:41 pgfmanual.pdf
-rw-r--r-- 1 mpg mpg  11M août   6 13:58 pgf-pdftk.pdf
-rw-r--r-- 1 mpg mpg 5,1M août   6 14:03 pgf-qpdf.pdf

I do not claim to be an expert with pdftk nor qpdf, but I searched the man and
didn't find any obvious way to do better.

Manuel.


Reply to: