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 |
|---|---|
java.awt.geom.Rectangle2D |
getBBox()
Returns the bounding box.
|
java.awt.geom.AffineTransform |
getMatrix()
Returns the Matrix value.
|
int |
output(java.io.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(java.io.OutputStream out)
Sends the raw stream data to the target OutputStream.
|
protected void |
populateStreamDict(java.lang.Object lengthEntry)
Populates the dictionary with all necessary entries for the stream.
|
void |
setBBox(java.awt.geom.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(java.awt.geom.AffineTransform at)
Sets the Matrix value
|
getName, getSizeHintencodeAndWriteStream, encodeStream, get, getChildren, getDefaultFilterName, getDictionary, getFilterList, multipleFiltersAllowed, outputStreamData, prepareImplicitFilters, put, registerChildren, setDocument, setupFilterListcontentEquals, 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(java.awt.geom.Rectangle2D bbox)
bbox - the bounding boxpublic java.awt.geom.Rectangle2D getBBox()
public void setMatrix(java.awt.geom.AffineTransform at)
at - the AffineTransform defining the transformation matrixpublic java.awt.geom.AffineTransform getMatrix()
public void setData(byte[] data)
throws java.io.IOException
data - the contents as a byte arrayjava.io.IOException - in case of an I/O problemprotected void outputRawStreamData(java.io.OutputStream out)
throws java.io.IOException
outputRawStreamData in class AbstractPDFStreamout - OutputStream to write tojava.io.IOException - In case of an I/O problempublic int output(java.io.OutputStream stream)
throws java.io.IOException
output in class AbstractPDFStreamstream - the stream to write the PDF tojava.io.IOException - if there is an error writing to the streamprotected void populateStreamDict(java.lang.Object lengthEntry)
populateStreamDict in class PDFXObjectlengthEntry - value for the /Length entryCopyright 1999-2022 The Apache Software Foundation. All Rights Reserved.