Tilted Forum Project Discussion Community

Tilted Forum Project Discussion Community (https://thetfp.com/tfp/)
-   Tilted Technology (https://thetfp.com/tfp/tilted-technology/)
-   -   [Java] Getting page count of a PDF (https://thetfp.com/tfp/tilted-technology/47078-java-getting-page-count-pdf.html)

bogosj13 02-26-2004 06:12 PM

[Java] Getting page count of a PDF
 
I'm currently working on a project that requires i get the page count of some PDFs, and this part of the system is written in Java. I've been trying to figure this out for a few days, and I've only come up with two options:
[list=1][*]I've written a Java class that opens PDFs using java.io.RandomAccessFile to parse though the PDF to determine the page count (had to read the PDF spec). I don't really trust this because, well, I wrote it.[*]Use Visual Basic to create an ActiveX DLL. Using VB, I can create an Acrobat document object and query the page count with Adobe's libraries. To integrate this DLL, I'd create a C DLL using gcc that links to the DLL that can be called via-JNI. That seems a bit complex.[/list=1]

The best option would be a Java library from Adobe, or a method to determine the page count from a PDF directly in C. Anyone have any suggestions?

kel 02-27-2004 06:30 AM

http://www.lowagie.com/iText/
Might have something useful?
Or
http://big.faceless.org/products/pdf/
or
http://www.etymon.com/epub.html

Truly google is your friend.
http://www.google.com/search?q=java+...UTF-8&oe=UTF-8

Have a blast.


All times are GMT -8. The time now is 09:08 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2
© 2002-2012 Tilted Forum Project


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54