org.pdfsam.console.utils
Class PdfUtility

java.lang.Object
  extended by org.pdfsam.console.utils.PdfUtility

public final class PdfUtility
extends java.lang.Object

Utility class for pdf documents

Author:
Andrea Vacondio

Method Summary
static com.lowagie.text.pdf.PdfReader fullReaderFor(PdfFile file)
           
static int getMaxBookmarksDepth(java.io.InputStream bookmarks)
           
static com.lowagie.text.pdf.PdfReader readerFor(PdfFile file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMaxBookmarksDepth

public static int getMaxBookmarksDepth(java.io.InputStream bookmarks)
                                throws java.lang.Exception
Parameters:
bookmarks - the stream to read the xml. Stream is not closed.
Returns:
the max depth of the bookmarks tree. 0 if no bookmark.
Throws:
java.lang.Exception

readerFor

public static com.lowagie.text.pdf.PdfReader readerFor(PdfFile file)
                                                throws java.io.IOException,
                                                       java.lang.NoSuchFieldException,
                                                       java.lang.IllegalAccessException
Throws:
java.io.IOException
java.lang.NoSuchFieldException
java.lang.IllegalAccessException

fullReaderFor

public static com.lowagie.text.pdf.PdfReader fullReaderFor(PdfFile file)
                                                    throws java.io.IOException,
                                                           java.lang.NoSuchFieldException,
                                                           java.lang.IllegalAccessException
Throws:
java.io.IOException
java.lang.NoSuchFieldException
java.lang.IllegalAccessException