I have a large number of small scores intended for Sunday morning service leaflets. Preparing the image for insertion into the MS Word document includes removing all the vertical blank space, which is different for each piece.
I currently create custom paper sizes via #(set! paper-alist (cons ...))
but there is still quite a lot of cropping the output images.
Is there a better way?
I wrote a Bash shell script to do this: https://github.com/andrewacashner/lilypond/lilycrop.sh
In the terminal of a Unix-based system (or perhaps on Cygwin on Windows, though I haven't tested that), this script will automatically crop the PDF output by lilypond to a minimum size. It produces a separate cropped PDF file for each page of the original.