com.mindfusion.pdf
Class PdfObject
java.lang.Object
com.mindfusion.pdf.PdfObject
- All Implemented Interfaces:
- INotify<PdfObject>, IPdfSaver, java.lang.Comparable
- Direct Known Subclasses:
- PdfCatalog, PdfFont, PdfFontDescription, PdfFunction, PdfGraphicsState, PdfHref, PdfImage, PdfImageHolder, PdfPage, PdfPagesRoot, PdfPath, PdfPattern, PdfShading, PdfText
public class PdfObject
- extends java.lang.Object
- implements IPdfSaver, INotify<PdfObject>, java.lang.Comparable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parent
protected PdfObject parent
offset
protected long offset
size
protected long size
id
protected long id
pdfType
protected int pdfType
page
protected PdfPage page
currentRotation
protected float currentRotation
currentTransform
protected java.awt.geom.AffineTransform currentTransform
PdfObject
public PdfObject(int _type,
PdfPage _page,
PdfDocument _doc)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
PdfObject
public PdfObject(int _type,
PdfDocument _doc)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
PdfObject
public PdfObject(int _type,
PdfPage _page)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
OnAdded
public void OnAdded(int index)
- Specified by:
OnAdded
in interface INotify<PdfObject>
OnChanged
public void OnChanged(int index,
PdfObject oldValue,
PdfObject newValue)
- Specified by:
OnChanged
in interface INotify<PdfObject>
getParent
public PdfObject getParent()
setParent
public void setParent(PdfObject parentVal)
getObjectHeader
public java.lang.String getObjectHeader()
getObjectFooter
public java.lang.String getObjectFooter()
getCollectionId
public long getCollectionId()
setCollectionId
public void setCollectionId(long collectionIdVal)
getOffset
public long getOffset()
getSize
public long getSize()
getDocument
public PdfDocument getDocument()
- private PdfDocument document = null;
public PdfDocument getDocument() {
return isRoot() ? document : page.getDocument();
}
registerObject
public void registerObject(PdfObject po)
getContent
protected byte[] getContent()
throws java.io.IOException
- Throws:
java.io.IOException
Save
public void Save(PdfWriter writer)
throws java.io.IOException
- Specified by:
Save
in interface IPdfSaver
- Throws:
java.io.IOException
getName
public java.lang.String getName()
- Returns:
- Pdf Object name as per format specification: OBJ%'0'3d
Format specifications described at: @see http://java.sun.com/javase/6/docs/api/java/util/Formatter.html#syntax
getId
public long getId()
- Returns:
- Pdf Object Id
getPdfType
public int getPdfType()
compareTo
public int compareTo(java.lang.Object o)
throws java.lang.IllegalArgumentException
- Specified by:
compareTo
in interface java.lang.Comparable
- Throws:
java.lang.IllegalArgumentException
compare
public static int compare(java.lang.Object o1,
java.lang.Object o2)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getPage
public PdfPage getPage()
getCurrentRotation
public float getCurrentRotation()
getCurrentTransform
public java.awt.geom.AffineTransform getCurrentTransform()
isRoot
public boolean isRoot()
isParentless
public boolean isParentless()