Re: Page size from PDF

Oddbjørn Kvalsund <[email protected]> Wed, 15 Apr 2009 18:10:21 +0200
Newsgroups gmane.comp.video.image-magick.devel
Message-ID <[email protected]>
On Wed 15 Apr 16:35, Darren Sheppard wrote:
> Hi
> =

> I have around 7000 PDF documents all with different page sizes within  =

> the same document. Is there anyway that image magick could extract all  =

> the page sizes from the PDFs and pass this Data into a text file?

I am not sure how detailed you want this information or in what format
you need it, but if you simply need to extract the sizes of a set PDFs
into a parseable format, you could use the Imagemagick command line tool
`identify'. Example:

oddbjorn@nixx:~$ identify -verbose test.pdf | egrep "(Image:|Scene:|Resolut=
ion:|Page geometry:)"
Image: test.pdf
  Resolution: 72x72
  Page geometry: 612x792+0+0
  Scene: 0 of 2
Image: test.pdf
  Resolution: 72x72
  Page geometry: 612x792+0+0
  Scene: 1 of 2

Note that I only have an old version (6.0.6) of Imagemagick available here =
and
that the format of the output might have changed in later versions, but you=
 get
the picture.

Hope this helps.

-- =

Regards,
Oddbj=F8rn Kvalsund