You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Eric Arlotti <ea...@orkis.com> on 2021/10/29 14:16:52 UTC

Getting the number of pages and their dimensions with command line tool

Hello,

Is there a command line tool to get the number of pages in a PDF and the width and height of each page ? Alternatively, is it possible to retrieve these information by writing my own tool using the PDFBox library ?

Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Getting the number of pages and their dimensions with command line tool

Posted by Tilman Hausherr <TH...@t-online.de>.
No, you'll have to write something. You'll need to get the cropBox of 
each page. 1 unit is 1/72 inch at 72 dpi.

In the javadocs, look for PDDocument and PDPage.

Tilman

Am 29.10.2021 um 16:16 schrieb Eric Arlotti:
> Hello,
>
> Is there a command line tool to get the number of pages in a PDF and the width and height of each page ? Alternatively, is it possible to retrieve these information by writing my own tool using the PDFBox library ?
>
> Eric
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org