Package com.openhtmltopdf.pdfboxout
Class PdfBoxPDFReplacedElement
- java.lang.Object
-
- com.openhtmltopdf.pdfboxout.PdfBoxPDFReplacedElement
-
- All Implemented Interfaces:
ReplacedElement,PdfBoxLinkManager.IPdfBoxElementWithShapedLinks,PdfBoxReplacedElement
public class PdfBoxPDFReplacedElement extends java.lang.Object implements PdfBoxReplacedElement, PdfBoxLinkManager.IPdfBoxElementWithShapedLinks
-
-
Field Summary
Fields Modifier and Type Field Description private float_heightprivate java.util.Map<java.awt.Shape,java.lang.String>_imageMapprivate java.awt.Point_locationprivate org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject_srcFormObjectprivate float_width
-
Constructor Summary
Constructors Modifier Constructor Description privatePdfBoxPDFReplacedElement(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject srcForm, org.w3c.dom.Element e, Box box, CssContext ctx, SharedContext shared, float w, float h)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PdfBoxPDFReplacedElementcreate(org.apache.pdfbox.pdmodel.PDDocument target, byte[] pdfBytes, org.w3c.dom.Element e, Box box, CssContext ctx, SharedContext shared)voiddetach(LayoutContext c)intgetBaseline()intgetIntrinsicHeight()intgetIntrinsicWidth()java.util.Map<java.awt.Shape,java.lang.String>getLinkMap()java.awt.PointgetLocation()Returns the current location where the element will be rendered on the canvasbooleanhasBaseline()booleanisRequiresInteractivePaint()voidpaint(RenderingContext c, PdfBoxOutputDevice outputDevice, BlockBox box)private static intparsePage(org.w3c.dom.Element e)voidsetLocation(int x, int y)Assigns the new locations where the element will be rendered.
-
-
-
Field Detail
-
_srcFormObject
private final org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject _srcFormObject
-
_width
private final float _width
-
_height
private final float _height
-
_imageMap
private final java.util.Map<java.awt.Shape,java.lang.String> _imageMap
-
_location
private java.awt.Point _location
-
-
Constructor Detail
-
PdfBoxPDFReplacedElement
private PdfBoxPDFReplacedElement(org.apache.pdfbox.pdmodel.graphics.form.PDFormXObject srcForm, org.w3c.dom.Element e, Box box, CssContext ctx, SharedContext shared, float w, float h)
-
-
Method Detail
-
parsePage
private static int parsePage(org.w3c.dom.Element e)
-
create
public static PdfBoxPDFReplacedElement create(org.apache.pdfbox.pdmodel.PDDocument target, byte[] pdfBytes, org.w3c.dom.Element e, Box box, CssContext ctx, SharedContext shared)
-
getIntrinsicWidth
public int getIntrinsicWidth()
- Specified by:
getIntrinsicWidthin interfaceReplacedElement
-
getIntrinsicHeight
public int getIntrinsicHeight()
- Specified by:
getIntrinsicHeightin interfaceReplacedElement
-
getLocation
public java.awt.Point getLocation()
Description copied from interface:ReplacedElementReturns the current location where the element will be rendered on the canvas- Specified by:
getLocationin interfaceReplacedElement- Returns:
- see desc
-
setLocation
public void setLocation(int x, int y)Description copied from interface:ReplacedElementAssigns the new locations where the element will be rendered.- Specified by:
setLocationin interfaceReplacedElement- Parameters:
x- new horizontal posy- new vertical pos
-
getLinkMap
public java.util.Map<java.awt.Shape,java.lang.String> getLinkMap()
- Specified by:
getLinkMapin interfacePdfBoxLinkManager.IPdfBoxElementWithShapedLinks
-
detach
public void detach(LayoutContext c)
- Specified by:
detachin interfaceReplacedElement
-
isRequiresInteractivePaint
public boolean isRequiresInteractivePaint()
- Specified by:
isRequiresInteractivePaintin interfaceReplacedElement
-
paint
public void paint(RenderingContext c, PdfBoxOutputDevice outputDevice, BlockBox box)
- Specified by:
paintin interfacePdfBoxReplacedElement
-
getBaseline
public int getBaseline()
- Specified by:
getBaselinein interfaceReplacedElement
-
hasBaseline
public boolean hasBaseline()
- Specified by:
hasBaselinein interfaceReplacedElement
-
-