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

Re: PDF files and dh_compress



On Tue, 9 May 2006, Frank Küster wrote:
Martin Wuertele <maxx@debian.org> wrote:
How about compressing all generated pdf with eg pdftk instead of gzip?
That would save on space without troubling potential readers.
Most PDF files in Debian are already compressed;  at least those
which are generated on a Debian system, and somehow TeX is involved
are.
[an example of TeX-generated pdf]
So somehow uncompressing-recompressing with pdftk gives a slightly
larger file [...]
To me, this sounds like in general it's not worth to compress compressed
pdf files with gzip; if we'd go for size, we should use bzip2.

An idea:
debhelper:
    if (-x '/usr/bin/pdftk'")
    {
        `pdftk $_ output $tmp uncompress`;
        `pdftk $tmp output $recompressed compress`;
        compare the sizes of $_ and $recompressed
        install the smaller
    }
    else
    {
        warn "PDF docs but no pdftk installed\n";
    }
lintian:
    W: PDF docs but no Build-Depends on pdftk

--
/-----------------------\ Shh, be vewy, vewy quiet,
| kilobyte@mimuw.edu.pl | I'm hunting wuntime ewwows!
\-----------------------/
Segmentation fault (core dumped)

Reply to: