Can't insert iframe in DocumentBuilder insertHTML

Hi,


I am converting DOCX to HTML using aspose and whenever I encounter an drawingML, I need to add an iframe. However, I don’t see the iframe added in the final output html. Looks like aspose tries to filter out iframe tag. Any other html content does get added.

Eg:
Document doc = new Dpcument(sourceFile);
DocumentBuilder builder = new DocumentBuilder(doc);
NodeCollection dmls = doc.getChildnodes(Nodetype.DRAWING_ML, true);
for (DrawingML dml : dmls) {
builder.moveTo(dml);
builder.insertHtml("
");
dml.remove();
}
doc.save("my.html", SaveFormat.HTML);


Thanks,
Chinmay




Hi Chinmay,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. If you load the iframe html in MS Word, you will get the same output as generated by Aspose.Words.

This is the expected behavior of Aspose.Words. Moreover, upon processing HTML, some features of
HTML might be lost. You can find a list of limitations upon HTML
exporting/importing here:
http://www.aspose.com/docs/display/wordsjava/Load+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format
http://www.aspose.com/docs/display/wordsjava/Save+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format

Hope this answers your query. Please let us know if you have any more queries.

Thanks Tahir for the answer and the link.


Chinmay

Hi Chinmay,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.