lilypond-user
[Top][All Lists]
Advanced

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

Re: bottom of EPS output cut off (+ size of PDF files)


From: Andrew Cashner
Subject: Re: bottom of EPS output cut off (+ size of PDF files)
Date: Wed, 7 Jan 2015 08:18:01 -0600

I wrote earlier about the bug in which Lilypond with the eps backend
inaccurately calculates the bounding box, and Andrea provided a
working solution (thank you).

I turned it into this Bash script, which works well for me, though I
don't understand why this process should be necessary.

Intriguingly, when I run this script it produces a cropped PDF image
which is about 10% the size of the PDF produced just by compiling with
lilypond alone.

In one example the full-page lilypond PDF, a single page with one
system of music, was 160K; the PDF produced by "lilycrop" was 19K!

****

~/bin/lilycrop:

#! /bin/sh
set -e

file="${1%.ly}"

lilypond "$file"
pdftops -eps "$file".pdf
cat "$file".eps | ps2eps > "$file"_cut.eps
epstopdf "$file"_cut.eps
rm "$file".eps "$file"_cut.eps
mv "$file"_cut.pdf "$file".pdf
echo "Cropped PDF '$file.pdf' produced from '$1'"

***

Andrew Cashner



reply via email to

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