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).
|
getName
encodeAndWriteStream, encodeStream, get, getDictionary, getFilterList, outputStreamData, put, registerChildren, setDocument, setupFilterList, supportsObjectStream
contentEquals, encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, outputInline, referencePDF, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDF, toPDFString
public 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 AbstractPDFStream
stream
- the output stream to write the dataIOException
- if there is an error writing the dataprotected void populateStreamDict(Object lengthEntry)
populateStreamDict
in class PDFXObject
lengthEntry
- value for the /Length entryprotected void outputRawStreamData(OutputStream out) throws IOException
outputRawStreamData
in class AbstractPDFStream
out
- OutputStream to write toIOException
- In case of an I/O problemprotected int getSizeHint() throws IOException
getSizeHint
in class PDFXObject
IOException
- in case of an I/O problemprotected void prepareImplicitFilters()
prepareImplicitFilters
in class AbstractPDFStream
protected String getDefaultFilterName()
getDefaultFilterName
in class AbstractPDFStream
PDFFilterList
protected boolean multipleFiltersAllowed()
multipleFiltersAllowed
in class AbstractPDFStream
public void getChildren(Set<PDFObject> children)
getChildren
in class AbstractPDFStream
Copyright © 2025 Apache Software Foundation. All rights reserved.