lilypond-devel
[Top][All Lists]
Advanced

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

Re: Reduce size of PDF files when inc. in *TeX docs (issue 194090043 by


From: Knut Petersen
Subject: Re: Reduce size of PDF files when inc. in *TeX docs (issue 194090043 by address@hidden)
Date: Thu, 15 Jan 2015 13:01:42 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 15.01.2015 10:45, address@hidden wrote:

Reliable?  If I remember correctly, the tool used for combining the
fonts (ppdfsizeopt.py)

Ghostscript does the font merging.

fails on the PDF files from PDFLaTeX, so there
must be an additional iteration through GhostScript.  This additional
iteration will reencode and resample included bitmap graphics at some
command line option dependent resolution, correct?

pdfsizeopt.py does some optimization of the remaining fonts, it tries to
find better compression for images, etc.

What happens with hyperlinks?  Has anybody checked those?

BTW: All this has been documented in the commit message of the git-formatted
patch sent to lilypond-devel:

Internal hyperlinks are fully preserved with current ghostscript git master.

External hyperlinks (GoToR) _to_ a file processed this way are broken.
Fixing this would require major changes to ghostscript.

External hyperlinks _from_ a file processed this way to other pdfs are
preserved if the reader program isn't broken (acroread is not broken
in this respect, evince is).

For more details see Ghostscript bug #695747 
<http://bugs.ghostscript.com/show_bug.cgi?id=695747#c22>

At any rate, I've taken a look at the description of pdfsizeopt, and it
would appear that it is optimized for working on PDF files created by
PDFTeX.  That would imply that it would be
a) really a good idea to get along without using Ghostscript as an
intermediary.  That seems like it would require fixing pdfsizeopt.  Its
project page contains a link "Doesn't pdfsizeopt work with your PDF?
Report the issue".  Now there is a remarkable dearth of names on the web
pages, but from other projects and content under this account and the
account's name I should be surprised if this project is not owned by
Szabó Péter.  And I should be surprised if he does not manage to fix the
problem when reported or suggest a full quality workaround.
b) in a similar vein, I'd ask Péter for suggestions about the best
course for having the font compaction work without blowing up the
intermediate files all too much.  Of course I am speculating on him just
making pdfsizeopt do all the work, but even if not, he'll be likely to
come up with a good plan.

The pdfsizeopt.py problems we run into (at least issues 2 and 18) are reported
since 2009, and a fix is still missing.  No, I won't rely on Peter to enhance 
and fix
his tool fast.

ghostscript is the tool that does the main work, pdfsizeopt.py is an option.


cu,
 Knut


reply via email to

[Prev in Thread] Current Thread [Next in Thread]