THBPdf Download Contact Us Buy Online Developerse-mail me

Extract page size from a single page pdf




Message-ID:<13e7bf0a-9059-474f-8a4b-8671ca6f319a@j35g2000yqh.googlegroups.com>
Subject:

Extract page size from a single-page pdf


Date:Wed, 4 Mar 2009 10:59:17 +0100


Hi all,

I'm using PHP (on Windows) to extract data from a bunch of single-page
PDFs. They are created as such and never subsequently edited (so they
were never, for instance, multipage PDFs from which pages were then
deleted).

What's the simplest way of extracting the page size from these files?
(I'm not particularly fussed about page orientation.)

At present, I'm using a combination of XPDF and pdftk to extract other
information from these files.




Message-ID:<4fae119b-59e3-4e8f-a708-68b212b49030@17g2000vbf.googlegroups.com>
Subject:

Re: Extract page size from a single-page pdf


Date:Wed, 4 Mar 2009 23:56:49 +0100


On Mar 4, 9:59=A0am, strawberry <zac.ca...@gmail.com> wrote:
> Hi all,
>
> I'm using PHP (on Windows) to extract data from a bunch of single-page
> PDFs. They are created as such and never subsequently edited (so they
> were never, for instance, multipage PDFs from which pages were then
> deleted).
>
> What's the simplest way of extracting the page size from these files?
> (I'm not particularly fussed about page orientation.)
>
> At present, I'm using a combination of XPDF and pdftk to extract other
> information from these files.

In the end, I've gone for a solution that simply embeds the page size
as text within the file at creation time. It's not ideal, but it'll
work well enough.




Message-ID:<d0753e5b-f2b6-4c2f-9005-b2ad6199d671@n20g2000vba.googlegroups.com>
Subject:

Re: Extract page size from a single-page pdf


Date:Thu, 5 Mar 2009 09:19:42 +0100


On Mar 4, 9:59=A0am, strawberry <zac.ca...@gmail.com> wrote:
> I'm using PHP (on Windows) to extract data from a bunch of single-page
> PDFs. They are created as such and never subsequently edited (so they
> were never, for instance, multipage PDFs from which pages were then
> deleted).
>
> What's the simplest way of extracting the page size from these files?
> (I'm not particularly fussed about page orientation.)
>
> At present, I'm using a combination of XPDF and pdftk to extract other
> information from these files.

feast:trunk john$ ./cpdf -page-info PDFTests/14psfonts.pdf
Page 1:
MediaBox: 0.000000 0.000000 600.000000 450.000000
CropBox:
BleedBox:
TrimBox:
ArtBox:

http://www.coherentpdf.com/ (Not free)






Message-ID:<13e7bf0a-9059-474f-8a4b-8671ca6f319a@j35g2000yqh.googlegroups.com>
Subject:

Extract page size from a single-page pdf


Date:Wed, 4 Mar 2009 10:59:17 +0100


Hi all,

I'm using PHP (on Windows) to extract data from a bunch of single-page
PDFs. They are created as such and never subsequently edited (so they
were never, for instance, multipage PDFs from which pages were then
deleted).

What's the simplest way of extracting the page size from these files?
(I'm not particularly fussed about page orientation.)

At present, I'm using a combination of XPDF and pdftk to extract other
information from these files.




Message-ID:<4fae119b-59e3-4e8f-a708-68b212b49030@17g2000vbf.googlegroups.com>
Subject:

Re: Extract page size from a single-page pdf


Date:Wed, 4 Mar 2009 23:56:49 +0100


On Mar 4, 9:59=A0am, strawberry <zac.ca...@gmail.com> wrote:
> Hi all,
>
> I'm using PHP (on Windows) to extract data from a bunch of single-page
> PDFs. They are created as such and never subsequently edited (so they
> were never, for instance, multipage PDFs from which pages were then
> deleted).
>
> What's the simplest way of extracting the page size from these files?
> (I'm not particularly fussed about page orientation.)
>
> At present, I'm using a combination of XPDF and pdftk to extract other
> information from these files.

In the end, I've gone for a solution that simply embeds the page size
as text within the file at creation time. It's not ideal, but it'll
work well enough.




Message-ID:<d0753e5b-f2b6-4c2f-9005-b2ad6199d671@n20g2000vba.googlegroups.com>
Subject:

Re: Extract page size from a single-page pdf


Date:Thu, 5 Mar 2009 09:19:42 +0100


On Mar 4, 9:59=A0am, strawberry <zac.ca...@gmail.com> wrote:
> I'm using PHP (on Windows) to extract data from a bunch of single-page
> PDFs. They are created as such and never subsequently edited (so they
> were never, for instance, multipage PDFs from which pages were then
> deleted).
>
> What's the simplest way of extracting the page size from these files?
> (I'm not particularly fussed about page orientation.)
>
> At present, I'm using a combination of XPDF and pdftk to extract other
> information from these files.

feast:trunk john$ ./cpdf -page-info PDFTests/14psfonts.pdf
Page 1:
MediaBox: 0.000000 0.000000 600.000000 450.000000
CropBox:
BleedBox:
TrimBox:
ArtBox:

http://www.coherentpdf.com/ (Not free)






 

|THBPdf| |Download| |Developers|