public class PDFImageXObject extends PDFXObject
| Constructor and Description |
|---|
PDFImageXObject(int xnumber,
PDFImage img)
create an XObject with the given number and name and load the
image in the object
|
| Modifier and Type | Method and Description |
|---|---|
void |
getChildren(Set<PDFObject> children) |
protected String |
getDefaultFilterName()
Returns the name of a suitable filter for this PDF object.
|
protected int |
getSizeHint()
Returns a value that hints at the size of the encoded stream.
|
protected boolean |
multipleFiltersAllowed()
Whether multiple filters can be applied.
|
int |
output(OutputStream stream)
Output the image as PDF.
|
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.
|
protected void |
prepareImplicitFilters()
Prepares implicit filters (such as the DCTFilter for JPEG images).
|
getNameencodeAndWriteStream, encodeStream, get, getDictionary, getFilterList, outputStreamData, 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 PDFImageXObject(int xnumber,
PDFImage img)
xnumber - the pdf object X numberimg - the pdf image that contains the image datapublic int output(OutputStream stream) throws IOException
output in class AbstractPDFStreamstream - the output stream to write the dataIOException - if there is an error writing the dataprotected void populateStreamDict(Object lengthEntry)
populateStreamDict in class PDFXObjectlengthEntry - value for the /Length entryprotected void outputRawStreamData(OutputStream out) throws IOException
outputRawStreamData in class AbstractPDFStreamout - OutputStream to write toIOException - In case of an I/O problemprotected int getSizeHint()
throws IOException
getSizeHint in class PDFXObjectIOException - in case of an I/O problemprotected void prepareImplicitFilters()
prepareImplicitFilters in class AbstractPDFStreamprotected String getDefaultFilterName()
getDefaultFilterName in class AbstractPDFStreamPDFFilterListprotected boolean multipleFiltersAllowed()
multipleFiltersAllowed in class AbstractPDFStreampublic void getChildren(Set<PDFObject> children)
getChildren in class AbstractPDFStreamCopyright © 2023 Apache Software Foundation. All rights reserved.