Hello Aspose Team,
I am trying to extract Html text from the doc and getting the exception below. Code i am using for this is
private String getClauseHTMLText(Paragraph clauseStart) throws Exception
{
String htmlText = null;
Document tempDoc = new Document();
Paragraph tempPara = clauseStart;
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
while (tempPara != null)
{
Node newNode = (Node) tempDoc.importNode(tempPara, true, ImportFormatMode.USE_DESTINATION_STYLES);
tempDoc.getLastSection().getBody().appendChild(newNode);
tempDoc.getLastSection().getBody().appendChild(new Paragraph(tempDoc));
tempPara = (Paragraph) tempPara.getNextSibling();
if(tempPara != null && tempPara.getListFormat() != null && tempPara.getListFormat().isListItem() && tempPara.getListFormat().getListLevelNumber() <= 1)
break;
}
tempDoc.save(outStream, SaveFormat.HTML);
htmlText = outStream.toString("UTF-8");
return htmlText;
}
Exception:
Caused by: java.lang.NoSuchMethodError: com.aspose.words.Paragraph.(Lcom/aspose/words/Document;)V
2010 - 07 - 28 17: 35: 03, 969 ERROR[STDERR] at com.zycus.authoring.document.WordDocService.getClauseHTMLText(WordDocService.java: 419)
Thanks!!