lilypond-user
[Top][All Lists]
Advanced

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

Re: Determining paper size of PDF via command-line tools?


From: Alexander Kobel
Subject: Re: Determining paper size of PDF via command-line tools?
Date: Tue, 21 Jan 2014 20:58:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

On 01/21/2014 08:27 PM, David Kastrup wrote:
Jim Long <address@hidden> writes:

I have been lax in enforcing a paper size in my engraved files.
This has been invisible to me, since apparently XPDF prints A4
files on a US letter-sized printer without complaint.

But some folks that I send PDFs to have noticed (and indeed I've
noticed it sometimes when I print in an unfamiliar environment).

Rather than re-engrave *everything*, I'd like to use a
grep/awk/whatever command pipe to determine the paper size of
certain PDF files.  I'll then re-engrave only those which are
identified as A4.  Is this possible, and if so, can anyone please
provide me a suitable UNIX command line that can identify the
paper size referenced by a given PDF filename?

pdfinfo is a good bet.

+1. Though from time to time it's harder to parse than GhostScript's output (see <http://stackoverflow.com/questions/6250064/ghostscript-boundingbox-values>), because it adds some human-readable interpretation. And you need to take care if you have different page sizes in the PDF (not an issue for LilyPond output, most probably). It's much faster, though, but this will be negligible if you spare some LilyPond runs...


Best,
Alexander



reply via email to

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