Hello,
We have an issue when creating a Word document from an HTML stream. The issue is regarding the html tag, where the resulting link on the Word document is broken because it doesn't contain the value from the base tag.
We are using Aspose Words version 15.6.0.
Here is the Java code snippet that reproduces this problem:
public void toAsposeWord() throws Exception {
String html = "" +
"" +
"<base href=\"http://localhost:8080/application/\">" +
"" +
"" +
"We are expecting a full url for the link!
" +
"<a href=\"summary?fromPage=1&toPage=77\">Page summary" +
"" +
"";
InputStream contentStream = new ByteArrayInputStream(html.getBytes(Charset.forName("UTF-8")));
Document doc = new Document(contentStream);
doc.save("/word.doc");
}
And here is the html again so it is easier to read:
Any feedback is appreciated as to how to resolve fix this issue.
Thank you for your help.
-M