Page 1 of 1

Converting a part of a word document to html

PostPosted: Thu Jun 07, 2012 1:59 am
by skyvic
Hi all,

I'm trying to convert a part of a word document to HTML.
For example, I have a word document with a table, and I would like extract and convert in HTML just the first cell, not the full document.

Is this possible with docx4j ?

If not, which is the best approach to do that ?

Thanks for your answers.

skyvic

Re: Converting a part of a word document to html

PostPosted: Thu Jun 07, 2012 9:56 am
by jason
You could just delete the bits you don't want to convert from docx4j's representation of the docx.

Alternatively, copy the bit you do want to copy to a new docx (which is easy if it is just text; harder if it contains images, hyperlinks etc).

Alternatively, modify the HTML Exporter to do it. This would be quite easy if you used https://github.com/plutext/docx4j/blob/ ... nXSLT.java