public class PDFFormXObject extends PDFXObject
| Constructor and Description |
|---|
PDFFormXObject(int xnumber,
PDFStream contents,
PDFReference resources)
create a FormXObject with the given number and name and load the
image in the object
|
| Modifier and Type | Method and Description |
|---|---|
Rectangle2D |
getBBox()
Returns the bounding box.
|
AffineTransform |
getMatrix()
Returns the Matrix value.
|
int |
output(OutputStream stream)
Overload the base object method so we don't have to copy
byte arrays around so much
Write the PDF represention of this object
|
protected void |
outputRawStreamData(OutputStream out)
Sends the raw stream data to the target OutputStream.
|
protected void |
populateStreamDict(Object lengthEntry)
Populates the dictionary with all necessary entries for the stream.
|
void |
setBBox(Rectangle2D bbox)
Sets the bounding box of the Form XObject.
|
void |
setData(byte[] data)
Used to set the contents of the PDF stream.
|
void |
setMatrix(AffineTransform at)
Sets the Matrix value
|
getName, getSizeHintencodeAndWriteStream, encodeStream, get, getChildren, getDefaultFilterName, getDictionary, getFilterList, multipleFiltersAllowed, outputStreamData, prepareImplicitFilters, put, registerChildren, setDocument, setupFilterList, supportsObjectStreamcontentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFStringpublic PDFFormXObject(int xnumber,
PDFStream contents,
PDFReference resources)
xnumber - the pdf object X numbercontents - the form's contentsresources - the resource PDF referencepublic void setBBox(Rectangle2D bbox)
bbox - the bounding boxpublic Rectangle2D getBBox()
public void setMatrix(AffineTransform at)
at - the AffineTransform defining the transformation matrixpublic AffineTransform getMatrix()
public void setData(byte[] data)
throws IOException
data - the contents as a byte arrayIOException - in case of an I/O problemprotected void outputRawStreamData(OutputStream out) throws IOException
outputRawStreamData in class AbstractPDFStreamout - OutputStream to write toIOException - In case of an I/O problempublic int output(OutputStream stream) throws IOException
output in class AbstractPDFStreamstream - the stream to write the PDF toIOException - if there is an error writing to the streamprotected void populateStreamDict(Object lengthEntry)
populateStreamDict in class PDFXObjectlengthEntry - value for the /Length entryCopyright © 2025 Apache Software Foundation. All rights reserved.