com.crionics.jpdf
Class PdfDocumentDescription

java.lang.Object
  extended by PdfModule
      extended by com.crionics.jpdf.AbstractModule
          extended by com.crionics.jpdf.PdfDocumentDescription

public class PdfDocumentDescription
extends AbstractModule

Gives a description of the document. Author, Title, size, number of pages..etc.


Field Summary
 
Fields inherited from class com.crionics.jpdf.AbstractModule
MOD_CREATOR, MOD_DESCRIPTION, MOD_ENCRYPTION, MOD_MERGER, MOD_PRINTER, MOD_SECURITY, MOD_SIGNER, MOD_TEMPLATE
 
Method Summary
 java.lang.String getAuthor()
          Returns the author of the document.
 java.util.Calendar getCreationDate()
          Returns the creation date of the document.
 java.lang.String getCreator()
          Returns the creator of the document.
 java.lang.String getKeywords()
          Returns the keywords of the document.
 java.util.Calendar getLastModifiedDate()
          Returns the last modified date of the document.
 int getPageCount()
          Returns the number of pages in the document.
 java.awt.print.PageFormat getPageFormat(int pageIndex)
          Returns the PageFormat of the specified page
 java.lang.String getPath()
          Returns the absolute path of the document.
 float getPdfVersion()
          return the PDF version used by this document.
 java.lang.String getProducer()
          Returns the producer of the document.
 int getSize()
          Returns the size of the document in bytes (updates unsaved included).
 java.lang.String getSubject()
          Returns the subject of the document.
 java.lang.String getTitle()
          Returns the title of the document.
 void setAuthor(java.lang.String author)
          Sets the author of the document.
 void setKeywords(java.lang.String keywords)
          Sets the keywords for the document.
 void setPdfVersion(float version)
          Sets the document version.
 void setSubject(java.lang.String subject)
          Sets the subject of the document.
 void setTitle(java.lang.String title)
          Sets the title of the document.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAuthor

public java.lang.String getAuthor()
                           throws PdfException,
                                  java.io.IOException
Returns the author of the document.

Returns:
The author of the document.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getCreationDate

public java.util.Calendar getCreationDate()
                                   throws PdfException,
                                          java.io.IOException
Returns the creation date of the document.

Returns:
The creation date of the document or today's date if missing.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getCreator

public java.lang.String getCreator()
                            throws PdfException,
                                   java.io.IOException
Returns the creator of the document.

Returns:
The creator of the document.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getKeywords

public java.lang.String getKeywords()
                             throws PdfException,
                                    java.io.IOException
Returns the keywords of the document.

Returns:
The keywords of the document.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getLastModifiedDate

public java.util.Calendar getLastModifiedDate()
                                       throws PdfException,
                                              java.io.IOException
Returns the last modified date of the document.

Returns:
The last modified date of the document.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getPageCount

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

Returns:
The number of pages in the document.

getPageFormat

public java.awt.print.PageFormat getPageFormat(int pageIndex)
                                        throws PdfException,
                                               java.io.IOException
Returns the PageFormat of the specified page

Parameters:
pageIndex - The index of the page
Returns:
The Page Format.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getPath

public java.lang.String getPath()
Returns the absolute path of the document.

Returns:
The absolute path of the document.

getPdfVersion

public float getPdfVersion()
                    throws java.io.IOException,
                           PdfException
return the PDF version used by this document.
typically,
1.3 is Acrobat 4
1.4 is Acrobat 5
1.5 is Acrobat 6
1.6 is Acrobat 7

Returns:
the PDF version used by this document
Throws:
PdfException
java.io.IOException

getProducer

public java.lang.String getProducer()
                             throws PdfException,
                                    java.io.IOException
Returns the producer of the document.

Returns:
The producer of the document.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getSize

public int getSize()
            throws java.io.IOException,
                   PdfException
Returns the size of the document in bytes (updates unsaved included).

Returns:
The size of the document in bytes (updates unsaved included).
Throws:
java.io.IOException - Raised if a problem occurred while reading the file.
PdfException - Raised if a problem occurred while parsing the file.

getSubject

public java.lang.String getSubject()
                            throws PdfException,
                                   java.io.IOException
Returns the subject of the document.

Returns:
The subject of the document.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

getTitle

public java.lang.String getTitle()
                          throws PdfException,
                                 java.io.IOException
Returns the title of the document.

Returns:
The title of the document.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

setAuthor

public void setAuthor(java.lang.String author)
               throws PdfException,
                      java.io.IOException
Sets the author of the document.

Parameters:
author - The author of the document to set.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

setKeywords

public void setKeywords(java.lang.String keywords)
                 throws PdfException,
                        java.io.IOException
Sets the keywords for the document.

Parameters:
keywords - A string a keywords of the document to set.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

setPdfVersion

public void setPdfVersion(float version)
                   throws java.io.IOException,
                          PdfException
Sets the document version. The changes appears in the next incremental update. You might want to look at the Preferences.setPDFVersionOfNewDocument() to set the default document version on new documents.

Parameters:
version - the PDF version in use for the documents
Throws:
PdfException
java.io.IOException

setSubject

public void setSubject(java.lang.String subject)
                throws PdfException,
                       java.io.IOException
Sets the subject of the document.

Parameters:
subject - The subject of the document to set.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.

setTitle

public void setTitle(java.lang.String title)
              throws PdfException,
                     java.io.IOException
Sets the title of the document.

Parameters:
title - The title of the document to set.
Throws:
PdfException - Raised if a problem occurred while parsing the file.
java.io.IOException - Raised if a problem occurred while reading the file.


Copyright © 1999-2007 Crionics. All Rights Reserved.