Package org.docx4j.convert.in.xhtml
Class XHTMLImageHandlerDefault
java.lang.Object
org.docx4j.convert.in.xhtml.XHTMLImageHandlerDefault
- All Implemented Interfaces:
XHTMLImageHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddImage(Docx4jUserAgent docx4jUserAgent, org.docx4j.openpackaging.packages.WordprocessingMLPackage wordMLPackage, org.docx4j.wml.P p, Element e, Long cx, Long cy) intvoidsetMaxWidth(int maxWidth) voidsetMaxWidth(int maxWidth, String tableStyle) Set the maximum width available (in twips); useful for scaling bare images if they are to go in a table cell.
-
Field Details
-
log
public static org.slf4j.Logger log -
imagePartCache
-
-
Constructor Details
-
XHTMLImageHandlerDefault
-
-
Method Details
-
getMaxWidth
public int getMaxWidth() -
setMaxWidth
Description copied from interface:XHTMLImageHandlerSet the maximum width available (in twips); useful for scaling bare images if they are to go in a table cell.
Also set table style if images are really to go in a table cell (needed to remove table style margins from final width).- Specified by:
setMaxWidthin interfaceXHTMLImageHandlertableStyle- - can be null
-
setMaxWidth
public void setMaxWidth(int maxWidth) -
addImage
public void addImage(Docx4jUserAgent docx4jUserAgent, org.docx4j.openpackaging.packages.WordprocessingMLPackage wordMLPackage, org.docx4j.wml.P p, Element e, Long cx, Long cy) - Specified by:
addImagein interfaceXHTMLImageHandler- Parameters:
docx4jUserAgent-wordMLPackage-p-e-cx- width of image itself (ie excluding CSS margin, padding) in EMUcy-
-