On 2008-09-08 14:20:38 +0000, Klaus Becker wrote:
> à l'aide d'OO, j'ai transformé un petit fichier doc en pdf, pour
> l'envoyer à mes collègues et pour les inviter à envoyer des fichiers
> pdf plutôt que doc.
>
> Seulement le fichier doc pèse 24 kb et le fichier pdf 204 kb ce qui
> est quand même gênant. On va me dire, mais le fichier pdf est bcp
> plus lourd !
>
> Est-ce que c'est normal ? Si qn veut regarder ça de près, je peux
> lui envoyer les 2 fichiers en privé.
C'est un problème connu:
http://qa.openoffice.org/issues/show_bug.cgi?id=43362
J'attache un script utilisant ps2pdf permettant de recompresser
le fichier PDF, notamment les fontes; il peut y avoir une perte
sensible sur les images puisque par défaut, elles sont aussi
recompressées, mais avec éventuellement une perte plus grande.
--
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
#!/bin/sh
# Optimize the use of the fonts in a PDF file by using ps2pdf.
if [ $# -eq 0 ]; then
echo "Usage: pdfcrush <file.pdf> ..." >&2
exit 1
fi
set -e
err=0
tmpfile="pdfcrush-$USER-$$.pdf"
for i in "$@"
do
if file "$i" | grep -q 'PDF document'; then
# cdate=$(pdftk "$i" dump_data | sed -n -e
# '/InfoKey: CreationDate/{n;s/InfoValue: D://p}')
ps2pdf "$i" "$tmpfile"
mv "$tmpfile" "$i"
printf "Successfully processed file %s\n" "$i"
else
printf "Skipping %s (not a PDF file)\n" "$i" >&2
err=2
fi
done
exit $err
# $Id: pdfcrush 17407 2007-05-17 20:24:39Z lefevre $
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]