Bug#675869: make PDF smaller with version1.4
Package: texlive-latex-extra-doc
Version: 2012.20120529-1
Severity: wishlist
Hi,
I got a advice from Munehiro Yamamoto (TeX package maintainer in VineLinux)
to reduce PDF file size in TeX related package. It's just using pdfwrite
device in GS to down its pdf level to 1.4.
----------------------------------------------------------------------------
how to
----------------------------------------------------------------------------
I wrote temporary script as compress.sh, to exec gs like this,
> gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH \
> -sOutputFile=$i.output $i && echo "$i"
It re-Distiller pdf files to PDF1.4 via GS's pdfwrite, its script consumes
15 min in my box.
> real 15m36.362s
> user 15m4.020s
> sys 0m17.365s
----------------------------------------------------------------------------
result
----------------------------------------------------------------------------
$ du -h *xz
279M data.tar.xz
245M usr.orig.tar.xz
145M usr.tar.xz
279MB -> 245MB (best xz compression, reduce 30MB as Bug#)
279MB -> 145MB (re-Distiller + best xz compression =130MB!)
I think that's worth to try it :)
And I've filed this to texlive-latex-extra-doc, however it may be applied to
other packages.
--
Regards,
Hideki Yamane henrich @ debian.or.jp/org
http://wiki.debian.org/HidekiYamane
#! /bin/sh
set -e
if [ ! -f tmpname ]; then
find ./usr/ -name *.pdf -type f -print >tmpname
fi
for i in `cat exclude.list`
do
sed s%$i%% -i tmpname
done
for i in `cat tmpname`
do
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH \
-sOutputFile=$i.output $i && echo "$i"
done
for i in `cat tmpname`
do
mv $i.output $i
done
rm tmpname
Reply to: