Package com.itextpdf.text.pdf.parser
Class ImageRenderInfo
- java.lang.Object
-
- com.itextpdf.text.pdf.parser.ImageRenderInfo
-
public class ImageRenderInfo extends java.lang.ObjectRepresents image data from a PDF- Since:
- 5.0.1
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static ImageRenderInfocreateForEmbeddedImage(GraphicsState gs, InlineImageInfo inlineImageInfo, PdfDictionary colorSpaceDictionary, java.util.Collection<MarkedContentInfo> markedContentInfo)Create an ImageRenderInfo object based on inline image data.static ImageRenderInfocreateForXObject(GraphicsState gs, PdfIndirectReference ref, PdfDictionary colorSpaceDictionary)Create an ImageRenderInfo object based on an XObject (this is the most common way of including an image in PDF)static ImageRenderInfocreateForXObject(GraphicsState gs, PdfIndirectReference ref, PdfDictionary colorSpaceDictionary, java.util.Collection<MarkedContentInfo> markedContentInfo)Create an ImageRenderInfo object based on an XObject (this is the most common way of including an image in PDF)floatgetArea()BaseColorgetCurrentFillColor()PdfImageObjectgetImage()Gets an object containing the image dictionary and bytes.MatrixgetImageCTM()java.lang.IntegergetMcid()PdfIndirectReferencegetRef()VectorgetStartPoint()booleanhasMcid(int mcid)Checks if the text belongs to a marked content sequence with a given mcid.booleanhasMcid(int mcid, boolean checkTheTopmostLevelOnly)Checks if the text belongs to a marked content sequence with a given mcid.
-
-
-
Method Detail
-
createForXObject
public static ImageRenderInfo createForXObject(GraphicsState gs, PdfIndirectReference ref, PdfDictionary colorSpaceDictionary)
Create an ImageRenderInfo object based on an XObject (this is the most common way of including an image in PDF)- Parameters:
gs- graphic state of the XObjectref- a reference to the image XObjectcolorSpaceDictionary- colourspace of the image- Returns:
- the ImageRenderInfo representing the rendered XObject
- Since:
- 5.0.1
-
createForXObject
public static ImageRenderInfo createForXObject(GraphicsState gs, PdfIndirectReference ref, PdfDictionary colorSpaceDictionary, java.util.Collection<MarkedContentInfo> markedContentInfo)
Create an ImageRenderInfo object based on an XObject (this is the most common way of including an image in PDF)- Parameters:
gs- graphic state of the XObjectref- a reference to the image XObjectcolorSpaceDictionary- colourspace of the imagemarkedContentInfo- marked content information for the XObject- Returns:
- the ImageRenderInfo representing the rendered XObject
- Since:
- 5.5.11
-
createForEmbeddedImage
protected static ImageRenderInfo createForEmbeddedImage(GraphicsState gs, InlineImageInfo inlineImageInfo, PdfDictionary colorSpaceDictionary, java.util.Collection<MarkedContentInfo> markedContentInfo)
Create an ImageRenderInfo object based on inline image data.- Parameters:
gs- graphic state of the XObjectInlineImageInfo- a reference to the inline imagecolorSpaceDictionary- colourspace of the imagemarkedContentInfo- marked content information for the XObject- Returns:
- the ImageRenderInfo representing the rendered embedded image
- Since:
- 5.0.1
-
getImage
public PdfImageObject getImage() throws java.io.IOException
Gets an object containing the image dictionary and bytes.- Returns:
- an object containing the image dictionary and byte[]
- Throws:
java.io.IOException- Since:
- 5.0.2
-
getStartPoint
public Vector getStartPoint()
- Returns:
- a vector in User space representing the start point of the xobject
-
getImageCTM
public Matrix getImageCTM()
- Returns:
- The coordinate transformation matrix active when this image was rendered. Coordinates are in User space.
- Since:
- 5.0.3
-
getArea
public float getArea()
- Returns:
- the size of the image, in User space units
- Since:
- 5.0.3
-
getRef
public PdfIndirectReference getRef()
- Returns:
- an indirect reference to the image
- Since:
- 5.0.2
-
getCurrentFillColor
public BaseColor getCurrentFillColor()
- Returns:
- the current fill color from the graphics state at the time this render operation occured
- Since:
- 5.5.7
-
hasMcid
public boolean hasMcid(int mcid)
Checks if the text belongs to a marked content sequence with a given mcid.- Parameters:
mcid- a marked content id- Returns:
- true if the text is marked with this id
- Since:
- 5.5.11
-
hasMcid
public boolean hasMcid(int mcid, boolean checkTheTopmostLevelOnly)Checks if the text belongs to a marked content sequence with a given mcid.- Parameters:
mcid- a marked content idcheckTheTopmostLevelOnly- indicates whether to check the topmost level of marked content stack only- Returns:
- true if the text is marked with this id
- Since:
- 5.5.11
-
getMcid
public java.lang.Integer getMcid()
- Returns:
- the marked content associated with the TextRenderInfo instance.
-
-