Package com.itextpdf.text.pdf
Class PdfImage
java.lang.Object
com.itextpdf.text.pdf.PdfObject
com.itextpdf.text.pdf.PdfDictionary
com.itextpdf.text.pdf.PdfStream
com.itextpdf.text.pdf.PdfImage
- All Implemented Interfaces:
Serializable
PdfImage
is a PdfStream
containing an image-Dictionary
and -stream.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Image
protected PdfName
This is thePdfName
of the image.(package private) static final int
Fields inherited from class com.itextpdf.text.pdf.PdfStream
BEST_COMPRESSION, BEST_SPEED, compressed, compressionLevel, DEFAULT_COMPRESSION, ENDSTREAM, inputStream, inputStreamLength, NO_COMPRESSION, rawLength, ref, SIZESTREAM, STARTSTREAM, streamBytes, writer
-
Constructor Summary
ConstructorsConstructorDescriptionPdfImage
(Image image, String name, PdfIndirectReference maskRef) Constructs aPdfImage
-object. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
generateImgResName
(Image img) Called when no resource name is provided in our constructor.getImage()
protected void
name()
Returns thePdfName
of the image.(package private) static void
transferBytes
(InputStream in, OutputStream out, int len) Methods inherited from class com.itextpdf.text.pdf.PdfStream
flateCompress, flateCompress, getRawLength, superToPdf, toPdf, toString, writeContent, writeLength
Methods inherited from class com.itextpdf.text.pdf.PdfDictionary
checkType, clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size
Methods inherited from class com.itextpdf.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Field Details
-
TRANSFERSIZE
static final int TRANSFERSIZE- See Also:
-
name
This is thePdfName
of the image. -
image
-
-
Constructor Details
-
PdfImage
public PdfImage(Image image, String name, PdfIndirectReference maskRef) throws BadPdfFormatException Constructs aPdfImage
-object.- Parameters:
image
- theImage
-objectname
- thePdfName
for this image- Throws:
BadPdfFormatException
- on error
-
-
Method Details
-
name
Returns thePdfName
of the image.- Returns:
- the name
-
getImage
-
transferBytes
- Throws:
IOException
-
importAll
-
generateImgResName
Called when no resource name is provided in our constructor. This generates a name that is required to be unique within a given resource dictionary.- Since:
- 5.0.1
-