Forum: Ruby on Rails How to count number of pages in a PDF?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
cal (Guest)
on 2006-04-02 07:32
(Received via mailing list)
Does any know a simple way to count the number of pages in a PDF file?
using teh RTEX plugin to generate a PDF via pdflatex with a defined
start page
number.  I want to determine the final page number so I can start the
next PDF
in sequence.

Thanks in advance for your help!

Roberto S. (Guest)
on 2006-04-02 09:30
(Received via mailing list)
I am using pdfbox for that, open source and simple to use if you are
familiar with java, but comes with the cost of starting a JVM. There is
a comercial lib called PDFLib, which now has Ruby bindings and which
very well in general.

Maybe there is an even simpler way, I also would like to know.
This topic is locked and can not be replied to.