org.docx4j.convert.in.xhtml.XHTMLImageHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docx4j-ImportXHTML Show documentation
Show all versions of docx4j-ImportXHTML Show documentation
docx4j-ImportXHTML converts XHTML to OpenXML WordML (docx) using docx4j
package org.docx4j.convert.in.xhtml;
import org.docx4j.openpackaging.packages.WordprocessingMLPackage;
import org.docx4j.org.xhtmlrenderer.docx.Docx4jUserAgent;
import org.docx4j.wml.P;
import org.w3c.dom.Element;
public interface XHTMLImageHandler {
/**
* @param docx4jUserAgent
* @param wordMLPackage
* @param p
* @param e
* @param cx width of image itself (ie excluding CSS margin, padding) in EMU
* @param cy
*/
public void addImage(Docx4jUserAgent docx4jUserAgent, WordprocessingMLPackage wordMLPackage, P p, Element e, Long cx, Long cy);
/*
* That sets text wrapping distance from text to 0.
*
* Also set table style if images are really to go in a table cell
* (needed to remove table style margins from final width).
* @param maxWidth
* @param tableStyle - can be null
*/
public void setMaxWidth(int maxWidth, String tableStyle);
}