Package com.ironsoftware.ironpdf.render
Class RenderedElementLocation
- java.lang.Object
-
- com.ironsoftware.ironpdf.render.RenderedElementLocation
-
public class RenderedElementLocation extends Object
Represents the rendered location of an HTML element within a PDF document.Returned by
PdfDocument.getElementLocations()after rendering HTML withChromePdfRenderOptions.setElementQuerySelectors(String[])configured.Mirrors
IronPdf.RenderedElementLocationon the C# side.
-
-
Constructor Summary
Constructors Constructor Description RenderedElementLocation()Default constructor.RenderedElementLocation(String text, int pageIndex, Rectangle2D.Double rectangle, int elementIndex)Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetElementIndex()intgetPageIndex()Rectangle2D.DoublegetRectangle()StringgetText()voidsetElementIndex(int elementIndex)voidsetPageIndex(int pageIndex)voidsetRectangle(Rectangle2D.Double rectangle)voidsetText(String text)StringtoString()
-
-
-
Constructor Detail
-
RenderedElementLocation
public RenderedElementLocation()
Default constructor.
-
RenderedElementLocation
public RenderedElementLocation(String text, int pageIndex, Rectangle2D.Double rectangle, int elementIndex)
Full constructor.- Parameters:
text- The text content of the matched elementpageIndex- The zero-based page index where the element was renderedrectangle- The bounding rectangle of the annotation marker on the pageelementIndex- The original document-order index of the element among all matched elements
-
-
Method Detail
-
getText
public String getText()
- Returns:
- The text content of the matched element.
-
setText
public void setText(String text)
-
getPageIndex
public int getPageIndex()
- Returns:
- The zero-based page index where the element was rendered.
-
setPageIndex
public void setPageIndex(int pageIndex)
-
getRectangle
public Rectangle2D.Double getRectangle()
- Returns:
- The bounding rectangle of the annotation marker on the page, in PDF points (1/72 inch). Coordinate origin is the bottom-left corner of the page. The rectangle corresponds to the injected anchor marker placed at the start of the matched element.
-
setRectangle
public void setRectangle(Rectangle2D.Double rectangle)
-
getElementIndex
public int getElementIndex()
- Returns:
- The original index of the element in document order among all matched elements.
-
setElementIndex
public void setElementIndex(int elementIndex)
-
-