Class PDXObjectForm
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject
-
- org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectForm
-
- All Implemented Interfaces:
COSObjectable
public class PDXObjectForm extends PDXObject
A form xobject.- Version:
- $Revision: 1.6 $
- Author:
- Ben Litchfield
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SUB_TYPE
The XObject subtype.
-
Constructor Summary
Constructors Constructor Description PDXObjectForm(COSStream formStream)
Standard constuctor.PDXObjectForm(PDStream formStream)
Standard constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PDRectangle
getBBox()
An array of four numbers in the form coordinate system (see below), giving the coordinates of the left, bottom, right, and top edges, respectively, of the form XObject's bounding box.int
getFormType()
This will get the form type, currently 1 is the only form type.Matrix
getMatrix()
This will get the optional Matrix of an XObjectForm.PDResources
getResources()
This will get the resources at this page and not look up the hierarchy.int
getStructParents()
This will get the key of this XObjectForm in the structural parent tree.void
setBBox(PDRectangle bbox)
This will set the BBox (bounding box) for this form.void
setFormType(int formType)
Set the form type.void
setMatrix(java.awt.geom.AffineTransform transform)
Sets the optional Matrix entry for the form XObject.void
setResources(PDResources resources)
This will set the resources for this page.void
setStructParents(int structParent)
This will set the key for this XObjectForm in the structural parent tree.-
Methods inherited from class org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject
clear, commonXObjectCreation, createXObject, getCOSObject, getCOSStream, getMetadata, getPDStream, getStructParent, setMetadata, setStructParent
-
-
-
-
Field Detail
-
SUB_TYPE
public static final java.lang.String SUB_TYPE
The XObject subtype.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDXObjectForm
public PDXObjectForm(PDStream formStream)
Standard constructor.- Parameters:
formStream
- The XObject is passed as a COSStream.
-
PDXObjectForm
public PDXObjectForm(COSStream formStream)
Standard constuctor.- Parameters:
formStream
- The XObject is passed as a COSStream.
-
-
Method Detail
-
getFormType
public int getFormType()
This will get the form type, currently 1 is the only form type.- Returns:
- The form type.
-
setFormType
public void setFormType(int formType)
Set the form type.- Parameters:
formType
- The new form type.
-
getResources
public PDResources getResources()
This will get the resources at this page and not look up the hierarchy. This attribute is inheritable, and findResources() should probably used. This will return null if no resources are available at this level.- Returns:
- The resources at this level in the hierarchy.
-
setResources
public void setResources(PDResources resources)
This will set the resources for this page.- Parameters:
resources
- The new resources for this page.
-
getBBox
public PDRectangle getBBox()
An array of four numbers in the form coordinate system (see below), giving the coordinates of the left, bottom, right, and top edges, respectively, of the form XObject's bounding box. These boundaries are used to clip the form XObject and to determine its size for caching.- Returns:
- The BBox of the form.
-
setBBox
public void setBBox(PDRectangle bbox)
This will set the BBox (bounding box) for this form.- Parameters:
bbox
- The new BBox for this form.
-
getMatrix
public Matrix getMatrix()
This will get the optional Matrix of an XObjectForm. It maps the form space into the user space- Returns:
- the form matrix
-
setMatrix
public void setMatrix(java.awt.geom.AffineTransform transform)
Sets the optional Matrix entry for the form XObject.- Parameters:
transform
- the transformation matrix
-
getStructParents
public int getStructParents()
This will get the key of this XObjectForm in the structural parent tree. Required if the form XObject contains marked-content sequences that are structural content items.- Returns:
- the integer key of the XObjectForm's entry in the structural parent tree
-
setStructParents
public void setStructParents(int structParent)
This will set the key for this XObjectForm in the structural parent tree.- Parameters:
structParent
- The new key for this XObjectForm.
-
-