Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Looking at the source code for the <code>org.apache.poi.hwpf.converter.WordToHtmlConverter</code> at <br> <br> <a href="http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java?view=markup&amp;pathrev=1180740" rel="nofollow">http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/WordToHtmlConverter.java?view=markup&amp;pathrev=1180740</a> <br> <br> It states in the JavaDoc:</p> <p><em>This implementation doesn't create images or links to them. This can be changed by overriding {@link #processImage(Element, boolean, Picture)} method</em></p> <p>If you take a look at that <code>processImage(...)</code> method in AbstractWordConverter.java at line 790, it looks like the method is calling then another method named <code>processImageWithoutPicturesManager(...)</code>. <br> <br> <a href="http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java?view=markup&amp;pathrev=1180740" rel="nofollow">http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/converter/AbstractWordConverter.java?view=markup&amp;pathrev=1180740</a> <br> <br> This method is defined in <code>WordToHtmlConverter</code> again and looks suspiciously exact like the place you want to grow your code (line 317):</p> <pre><code>@Override protected void processImageWithoutPicturesManager(Element currentBlock, boolean inlined, Picture picture) { // no default implementation -- skip currentBlock.appendChild(htmlDocumentFacade.document .createComment("Image link to '" + picture.suggestFullFileName() + "' can be here")); } </code></pre> <p>I think you have the point where to start inserting the images into the flow.</p> <p>Create a subclass of the converter, e.g.<br></p> <pre><code> public class InlineImageWordToHtmlConverter extends WordToHtmlConverter </code></pre> <p>and then override the method and place whatever code into it. <br> <br> I haven't tested it, but it should be the right way from what I see theoretically.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload