lilypond-user
[Top][All Lists]
Advanced

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

Re: generating pdf and png but no ps


From: Sebastian Menge
Subject: Re: generating pdf and png but no ps
Date: Fri, 3 Oct 2008 16:26:32 +0200

Am Fri, 03 Oct 2008 16:13:30 +0200
schrieb Alexander Kobel <address@hidden>:

> > Is there a simple way to see (e.g. from the shell or an external
> > programming language) how many png-pages lilypond produced?
> Well, three things come into my mind.
> 
> > --png produces file-page1.png file-page2.png etc.
> First, quick 'n' dirty:
>       ls -1 "file-page*.png" | wc -l
> (This is the digit one after ls (one entry per line), and the letter L
> after wc (count lines).)
> Make sure there's nothing else matching to the filename pattern.
> Otherwise you could do a bash loop and count until there's no file of
> the expected name... Or try something like
>       ls -1 | grep -E 'file-page[0-9]+\.png' | wc -l
> 
> But, since you generate the pdf anyway:
> Second, using pdfinfo (which I'm not sure where it comes from, but it
> seems to be standard. Maybe xpdf?):
>       pdfinfo file.pdf | grep "Pages:"
> and remove the "Pages:\t" in your script.
> 
> Third, same idea, and yet another advertising for the great pdftk
> (http://www.accesspdf.com/pdftk/):
>       pdftk file.pdf dump_data | grep "NumberOfPages:"
> and remove the "NumberOfPages: " in your script.

There is no option to get similar output directly from lily?

Hmm, ok. These are enough workarounds to keep going.

And you are right, pdftk is a *great* tool (and FYI it's just a wrapper
to a java-library called iText by Bruno Lowagi. There are ports to
other languages (e.g. c#) , but i dont know about any port to
scheme :-) ) 

Thanks, S.




reply via email to

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