com.qoppa.pdf
Class DocumentInfo

java.lang.Object
  extended bycom.qoppa.pdf.DocumentInfo

public class DocumentInfo
extends Object

This class is a container for the information section of a PDF document. This section contains fields such as author, title, subject, keywords, etc...

Author:
Qoppa Software

Field Summary
static String KEY_AUTHOR
           
static String KEY_CREATIONDATE
           
static String KEY_CREATOR
           
static String KEY_KEYWORDS
           
static String KEY_MODDATE
           
static String KEY_PRODUCER
           
static String KEY_SUBJECT
           
static String KEY_TITLE
           
 
Constructor Summary
DocumentInfo(int pageCount)
          Document Info constructor.
 
Method Summary
 Object clone()
          Make a copy of this object.
 String getAuthor()
          Returns the document's author.
 Date getCreationDate()
          Returns the document's creation date.
 String getCreator()
          Returns the document's creator.
static DocumentInfo getDocumentInfo(InputStream inStream, IPasswordHandler pwdHandler)
          Static method to get the document information from a document from an InputStream.
static DocumentInfo getDocumentInfo(String fileName, IPasswordHandler pwdHandler)
          Static method to get the document information from a document in a file.
static DocumentInfo getDocumentInfo(URL url, IPasswordHandler pwdHandler)
          Static method to get the document information from a document from a URL.
 String getKeywords()
          Returns the document's keywords.
 Date getModDate()
          Returns the document's modified date.
 int getPageCount()
          Gets the number of pages in the document.
 String getProducer()
          Returns the document's producer.
 String getSubject()
          Returns the document's subject.
 String getTitle()
          Gets the document's title.
 void setAuthor(String author)
          Set the document's author.
 void setCreationDate(Date creationDate)
          Set the document's creation date.
 void setCreator(String creator)
          Set the document's creator.
 void setKeywords(String keywords)
          Set the document's keywords.
 void setModifiedDate(Date modDate)
          Set the document's modified date.
 void setProducer(String producer)
          Set the document's producer.
 void setSubject(String subject)
          Set the document's subject.
 void setTitle(String title)
          Sets the document's title.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_TITLE

public static final String KEY_TITLE
See Also:
Constant Field Values

KEY_AUTHOR

public static final String KEY_AUTHOR
See Also:
Constant Field Values

KEY_SUBJECT

public static final String KEY_SUBJECT
See Also:
Constant Field Values

KEY_KEYWORDS

public static final String KEY_KEYWORDS
See Also:
Constant Field Values

KEY_CREATOR

public static final String KEY_CREATOR
See Also:
Constant Field Values

KEY_PRODUCER

public static final String KEY_PRODUCER
See Also:
Constant Field Values

KEY_CREATIONDATE

public static final String KEY_CREATIONDATE
See Also:
Constant Field Values

KEY_MODDATE

public static final String KEY_MODDATE
See Also:
Constant Field Values
Constructor Detail

DocumentInfo

public DocumentInfo(int pageCount)
Document Info constructor.

Parameters:
pageCount - The number of pages in the document.
Method Detail

getDocumentInfo

public static DocumentInfo getDocumentInfo(String fileName,
                                           IPasswordHandler pwdHandler)
                                    throws PDFException
Static method to get the document information from a document in a file.

Parameters:
fileName - The name of the file.
pwdHandler - A password handler to use in case the file is encrypted.
Returns:
A DocumentInfo object containing the PDF document's header information.
Throws:
PDFException

getDocumentInfo

public static DocumentInfo getDocumentInfo(InputStream inStream,
                                           IPasswordHandler pwdHandler)
                                    throws PDFException
Static method to get the document information from a document from an InputStream.

Parameters:
inStream - InputStream that will be used to read the PDF document.
pwdHandler - A password handler to use in case the file is encrypted.
Returns:
A DocumentInfo object containing the PDF document's header information.
Throws:
PDFException

getDocumentInfo

public static DocumentInfo getDocumentInfo(URL url,
                                           IPasswordHandler pwdHandler)
                                    throws PDFException
Static method to get the document information from a document from a URL.

Parameters:
url - The url where the PDF document can be found.
pwdHandler - A password handler to use in case the file is encrypted.
Returns:
A DocumentInfo object containing the PDF document's header information.
Throws:
PDFException

getTitle

public String getTitle()
Gets the document's title.

Returns:
The document title.

setTitle

public void setTitle(String title)
Sets the document's title.

Parameters:
title - The document's title.

getAuthor

public String getAuthor()
Returns the document's author.

Returns:
The document's author.

getSubject

public String getSubject()
Returns the document's subject.

Returns:
The document's subject.

getKeywords

public String getKeywords()
Returns the document's keywords.

Returns:
The document's keywords.

getCreator

public String getCreator()
Returns the document's creator.

Returns:
The document's creator.

getProducer

public String getProducer()
Returns the document's producer.

Returns:
The document's producer.

getCreationDate

public Date getCreationDate()
Returns the document's creation date.

Returns:
The document's creation date.

getModDate

public Date getModDate()
Returns the document's modified date.

Returns:
The document's modified date.

getPageCount

public int getPageCount()
Gets the number of pages in the document.

Returns:
Number of pages.

setAuthor

public void setAuthor(String author)
Set the document's author.

Parameters:
author - The document's author.

setCreationDate

public void setCreationDate(Date creationDate)
Set the document's creation date.

Parameters:
creationDate - The document's creation date.

setCreator

public void setCreator(String creator)
Set the document's creator.

Parameters:
creator - The document's creator.

setKeywords

public void setKeywords(String keywords)
Set the document's keywords.

Parameters:
keywords - The document's keywords.

setModifiedDate

public void setModifiedDate(Date modDate)
Set the document's modified date.

Parameters:
modDate - The document's modified date.

setProducer

public void setProducer(String producer)
Set the document's producer.

Parameters:
producer - The document's producer.

setSubject

public void setSubject(String subject)
Set the document's subject.

Parameters:
subject - The document's subject.

clone

public Object clone()
Make a copy of this object.