Class PDXObjectForm
java.lang.Object
org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject
org.apache.pdfbox.pdmodel.graphics.xobject.PDXObjectForm
- All Implemented Interfaces:
COSObjectable
A form xobject.
- Version:
- $Revision: 1.6 $
- Author:
- Ben Litchfield
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPDXObjectForm
(COSStream formStream) Standard constuctor.PDXObjectForm
(PDStream formStream) Standard constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetBBox()
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
This will get the form type, currently 1 is the only form type.This will get the optional Matrix of an XObjectForm.This will get the resources at this page and not look up the hierarchy.int
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
(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 Details
-
SUB_TYPE
The XObject subtype.- See Also:
-
-
Constructor Details
-
PDXObjectForm
Standard constructor.- Parameters:
formStream
- The XObject is passed as a COSStream.
-
PDXObjectForm
Standard constuctor.- Parameters:
formStream
- The XObject is passed as a COSStream.
-
-
Method Details
-
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
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
This will set the resources for this page.- Parameters:
resources
- The new resources for this page.
-
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
This will set the BBox (bounding box) for this form.- Parameters:
bbox
- The new BBox for this form.
-
getMatrix
This will get the optional Matrix of an XObjectForm. It maps the form space into the user space- Returns:
- the form matrix
-
setMatrix
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.
-