ElegantJ PDF Library Java API Specification v1.1

com.elegantj.pdf
Class PDF

java.lang.Object
  extended bycom.elegantj.pdf.PDF
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class PDF
extends java.lang.Object
implements java.io.Externalizable

PDF is the base class for the PDf generator library

See Also:
Serialized Form

Field Summary
static PDFFont generalFont
           
protected  java.util.Vector objects
          This vector contains each indirect object within the document
 
Constructor Summary
PDF()
          The default constructor which constructs a PDF object with default page mode The default page mode is Catalog.USENONE
PDF(int pagemode)
          The constructor which constructs a PDF object with specified page mode
 
Method Summary
 void add(PDFObject obj)
          Method which adds a PDF object to the document Some objects which have kids will have their own add() method, which will call this method internally.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds the property change listener
 Catalog getCatalog()
          Method which returns the Catalog object for the PDF document Catalog is a dictionary which contains a reference to the tree of pages contained in the PDF document, a reference to the tree of objects representing the documentís outlines, etc.
 Info getInfo()
          Method which returns the Info object for the PDF document The Info object provides information about the PDF document
 java.lang.String getLicenseKey()
          Returns the license key of the bean
 Outlines getOutlines()
          Method which returns the root outlines (also called a bookmark) object of the PDF document An outlines allows a user to access views of a document by name.
 Page getPage(int page)
          This returns a specific page
 Pages getPages()
          Method which returns the Pages object for the PDF document The Pages object contains a tree like hierarchy which defines the ordering of the pages in the PDF document
 void readExternal(java.io.ObjectInput in)
          Implementation of the Externalizable
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes the property change listener
 void setLicenseKey(java.lang.String licenseKey)
          Methods which sets the license key
 void write(java.io.OutputStream os)
          This writes the PDF document to an OutputStream The OutputStream is not closed, but will be flushed on completion.
 void writeExternal(java.io.ObjectOutput out)
          Implementation of the Externalizable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objects

protected java.util.Vector objects
This vector contains each indirect object within the document


generalFont

public static PDFFont generalFont
Constructor Detail

PDF

public PDF()
The default constructor which constructs a PDF object with default page mode The default page mode is Catalog.USENONE


PDF

public PDF(int pagemode)
The constructor which constructs a PDF object with specified page mode

Parameters:
pagemode - Determines how the document will present itself to the viewer when it first opens Possible values are: Catalog.USENONE, Catalog.USEOUTLINES, Catalog.USETHUMBS, Catalog.FULLSCREEN
Method Detail

add

public void add(PDFObject obj)
Method which adds a PDF object to the document Some objects which have kids will have their own add() method, which will call this method internally.

Parameters:
obj - The PDFObject to add to the document

getPage

public Page getPage(int page)
This returns a specific page

Parameters:
page - The page number to return
Returns:
Page at that position

getPages

public Pages getPages()
Method which returns the Pages object for the PDF document The Pages object contains a tree like hierarchy which defines the ordering of the pages in the PDF document

Returns:
The Pages object for the PDF document

getCatalog

public Catalog getCatalog()
Method which returns the Catalog object for the PDF document Catalog is a dictionary which contains a reference to the tree of pages contained in the PDF document, a reference to the tree of objects representing the documentís outlines, etc.

Returns:
The Catalog object for the PDF document

getInfo

public Info getInfo()
Method which returns the Info object for the PDF document The Info object provides information about the PDF document

Returns:
The Info object for the PDF document

getOutlines

public Outlines getOutlines()
Method which returns the root outlines (also called a bookmark) object of the PDF document An outlines allows a user to access views of a document by name. Activation of an outlines entry brings up a new view based on the destination description

Returns:
The root outlines object of the PDF document

write

public void write(java.io.OutputStream os)
           throws java.io.IOException
This writes the PDF document to an OutputStream The OutputStream is not closed, but will be flushed on completion. It is up to the caller to close the stream.

Parameters:
os - The OutputStream to write the document to
Throws:
java.io.IOException

setLicenseKey

public void setLicenseKey(java.lang.String licenseKey)
Methods which sets the license key


getLicenseKey

public java.lang.String getLicenseKey()
Returns the license key of the bean

Returns:
The license key of the bean

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds the property change listener

Parameters:
l - The property change listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the property change listener

Parameters:
l - The property change listener

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException,
                          java.awt.IllegalComponentStateException
Implementation of the Externalizable

Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.awt.IllegalComponentStateException

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Implementation of the Externalizable

Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

ElegantJ PDF Library Java API Specification v1.1

For any feedback, suggestion, or query, please revert back to support@elegantjpdf.com

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjpdf.com
All Rights Reserved.