[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Reduce size of *TeX generated pdfs, Version 2
From: |
Knut Petersen |
Subject: |
Re: [PATCH] Reduce size of *TeX generated pdfs, Version 2 |
Date: |
Fri, 09 Jan 2015 12:23:16 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
Hi James!
Attached is a small *.tex document that can be translated by xelatex or
lualatex,
one page including four small snippets.
It demonstrates that also small documents with only a few snippets benefit from
the --bigpdf patch. lualatex must be called with the --shell-escape parameter to
allow it to execute lilypond and pdfcrop (obviously that needs to be installed).
Be aware of the fact that translation will also generate (or overwrite !) some
aux
files named tmplilytail.ly, tmplilyhead.ly, tmplilypaper.ly, tmplily.ly,
tmplilyfrag1.pdf,
tmplilyfrag3.pdf, tmplilyfrag2.pdf, tmplilyfrag4.pdf.
Edit line 22 to contain the path to your lilypond test executable (dont delete
the
space after lilypond) and line 23 to either contain nothing or --bigpdf.
Then translate test.tex to pdf with
lualatex --shell-escape test
gs -sDEVICE=pdfwrite -o testtmp.pdf test.pdf
pdfsizeopt.py --use-multivalent=no testtmp.pdf testfinal.pdf
dir test*pdf --sort=time | tac
With line 23 "\def\lilyparms{ }" I get
-rw-r--r-- 1 knut users 173538 9. Jan 11:53 test.pdf
-rw-r--r-- 1 knut users 157303 9. Jan 11:53 testtmp.pdf
-rw-r--r-- 1 knut users 149945 9. Jan 11:53 testfinal.pdf
With line 23 "\def\lilyparms{ --bigpdf }" I get
-rw-r--r-- 1 knut users 879441 9. Jan 11:55 test.pdf
-rw-r--r-- 1 knut users 63359 9. Jan 11:55 testtmp.pdf
-rw-r--r-- 1 knut users 59437 9. Jan 11:55 testfinal.pdf
cu,
Knut
test.tex
Description: Text Data