Hi team,
How to insert a empty node(most probably Paragraph) before and after a shape? Shape should include all graphical images,tables,group images inside text area.I had tried with the below code,
Document doc = new Document (“word_doc”);
for(Shape s :(Iterable)doc.getChildNodes(NodeType.SHAPE, true) ) {
s.getParentNode().insertBefore(new Paragraph(doc), s);
s.getParentNode().insertAfter(new Paragraph(doc), s);
}
doc.save(“filename”);
But, it resulted with the following error.
Error:
Invalid arguments
Cannot insert a node of this type at this location.
For time being please give a work around solution earlier as much possible.
Sample word doc: 22-LNCS11418_268.zip (930.0 KB)
Thanks in advance.
Regards,
Gomathi. N.