com.internationalnetwork.util.pdf
Class PDFInfo

Object
  extended by com.internationalnetwork.util.pdf.PDFInfo

public class PDFInfo
extends Object

The readInfo class extracts Document Information from the specified Adobe PDF (Portable Document Format) file, and provides a number of options for developers to read that information.


Field Summary
static Integer STATUS_CORRUPT_TRAILER_DICT_XREF_MISSING
          13, trailer dictionary marker is missing.  Specifying a larger "beforeEOF" integer may be helpful.
static Integer STATUS_CORRUPT_TRAILER_MISSING
          11, trailer dictionary end-marker is missing.
static Integer STATUS_CORRUPT_TRAILER_UNKNOWN
          12, file is too small or trailer dictionary is too large.  Specifying a larger "beforeEOF" integer may be helpful.
static Integer STATUS_CORRUPT_XREF_MISSING
          10, initial cross-reference marker is missing.
static Integer STATUS_FAILED_TO_READ_HEADER
          3, failed to read PDF header.
static Integer STATUS_INVALID_FORMAT
          2, invalid file format -- not a PDF file.
static Integer STATUS_INVALID_XREF
          9, file is too small, or section containing final markers and cross-references is too large.  If the latter is true, then specifying a larger "beforeEOF" integer may be helpful.
static Integer STATUS_INVALID_XREF_MARKER
          4, initial cross-reference marker is invalid.
static Integer STATUS_INVALID_XREF_MARKER_BELOW
          5, initial cross-reference marker is below minimum possible value or is a negative value.
static Integer STATUS_INVALID_XREF_MARKER_BEYOND
          7, initial cross-reference marker points beyond end of file.
static Integer STATUS_INVALID_XREF_MARKER_HEADER
          6, initial cross-reference marker points to PDF file header.
static Integer STATUS_MISSING_EOF_MARKER
          8, final EoF (End of File) marker is missing.
static Integer STATUS_SUCCESS
          0, file was read successfully, and appears to be a valid format.
static Integer STATUS_UNPROCESSED
          1, file hasn't been processed yet.
static String VERSION
          Version number of this Package (read-only).
 
Constructor Summary
PDFInfo()
           
 
Method Summary
 boolean getFrom(String filename)
          Opens the specified PDF file and attempts to read the Document Properties from the information section.  Returns "true" only if the file's format conforms to the minimum requirements that make it detectable as a valid PDF file, regardless of the presence of an information section.
 Integer getStatus()
          Returns the status text for the most recent operation.
static void main(String[] args)
          DO NOT USE!!!  WAITING FOR SUN TO IMPROVE JAVADOC TOOL...
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_CORRUPT_TRAILER_DICT_XREF_MISSING

public static final Integer STATUS_CORRUPT_TRAILER_DICT_XREF_MISSING
13, trailer dictionary marker is missing.  Specifying a larger "beforeEOF" integer may be helpful.


STATUS_CORRUPT_TRAILER_MISSING

public static final Integer STATUS_CORRUPT_TRAILER_MISSING
11, trailer dictionary end-marker is missing.


STATUS_CORRUPT_TRAILER_UNKNOWN

public static final Integer STATUS_CORRUPT_TRAILER_UNKNOWN
12, file is too small or trailer dictionary is too large.  Specifying a larger "beforeEOF" integer may be helpful.


STATUS_CORRUPT_XREF_MISSING

public static final Integer STATUS_CORRUPT_XREF_MISSING
10, initial cross-reference marker is missing.


STATUS_FAILED_TO_READ_HEADER

public static final Integer STATUS_FAILED_TO_READ_HEADER
3, failed to read PDF header.


STATUS_INVALID_FORMAT

public static final Integer STATUS_INVALID_FORMAT
2, invalid file format -- not a PDF file.


STATUS_INVALID_XREF

public static final Integer STATUS_INVALID_XREF
9, file is too small, or section containing final markers and cross-references is too large.  If the latter is true, then specifying a larger "beforeEOF" integer may be helpful.


STATUS_INVALID_XREF_MARKER

public static final Integer STATUS_INVALID_XREF_MARKER
4, initial cross-reference marker is invalid.


STATUS_INVALID_XREF_MARKER_BELOW

public static final Integer STATUS_INVALID_XREF_MARKER_BELOW
5, initial cross-reference marker is below minimum possible value or is a negative value.


STATUS_INVALID_XREF_MARKER_BEYOND

public static final Integer STATUS_INVALID_XREF_MARKER_BEYOND
7, initial cross-reference marker points beyond end of file.


STATUS_INVALID_XREF_MARKER_HEADER

public static final Integer STATUS_INVALID_XREF_MARKER_HEADER
6, initial cross-reference marker points to PDF file header.


STATUS_MISSING_EOF_MARKER

public static final Integer STATUS_MISSING_EOF_MARKER
8, final EoF (End of File) marker is missing.


STATUS_SUCCESS

public static final Integer STATUS_SUCCESS
0, file was read successfully, and appears to be a valid format.


STATUS_UNPROCESSED

public static final Integer STATUS_UNPROCESSED
1, file hasn't been processed yet.


VERSION

public static final String VERSION
Version number of this Package (read-only).

See Also:
Constant Field Values
Constructor Detail

PDFInfo

public PDFInfo()
Method Detail

getFrom

public boolean getFrom(String filename)
                throws java.io.IOException
Opens the specified PDF file and attempts to read the Document Properties from the information section.  Returns "true" only if the file's format conforms to the minimum requirements that make it detectable as a valid PDF file, regardless of the presence of an information section.

Throws:
java.io.IOException

getStatus

public Integer getStatus()
Returns the status text for the most recent operation.


main

public static void main(String[] args)
DO NOT USE!!!  WAITING FOR SUN TO IMPROVE JAVADOC TOOL...