https://bz.apache.org/bugzilla/show_bug.cgi?id=60912
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |m --- Comment #1 from [email protected] --- Created attachment 35010 --> https://bz.apache.org/bugzilla/attachment.cgi?id=35010&action=edit Extension of WordToHtmlConverter to avoid decimal font size issue. Details mentioned in comments I am using below code to convert doc to html. HWPFDocumentCore wordDocument = WordToHtmlUtils.loadDoc(new File(inFilePath)); WordToHtmlConverter wordToHtmlConverter = new CustomWordToHtmlConverter( new HtmlDocumentFacade(DocumentBuilderFactory.newInstance().newDocumentBuilder() .newDocument())); wordToHtmlConverter.processDocument(wordDocument); Document htmlDocument = wordToHtmlConverter.getDocument(); ByteArrayOutputStream out = new ByteArrayOutputStream(); DOMSource domSource = new DOMSource(htmlDocument); StreamResult streamResult = new StreamResult(out); TransformerFactory tf = TransformerFactory.newInstance(); Transformer serializer = tf.newTransformer(); serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); serializer.setOutputProperty(OutputKeys.INDENT, "yes"); serializer.setOutputProperty(OutputKeys.METHOD, "html"); serializer.transform(domSource, streamResult); BufferedWriter out1 = new BufferedWriter (new OutputStreamWriter(new FileOutputStream(new File(outFilePath)),"UTF-8")); out1.write(out.toString()); out1.close(); Conversion seems to ignore fonts with size decimal values. Let's say if in original doc font has size 11.5 it will be 11 in converted html. I have made changes in CustomWordToHtmlConverter.java file to avoid this. But I am not able to get size of a bullet and the color of bullet. Kindly help me to get this issue resolved -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
