Hi team,
My requirement is to extract the images from word document and save it in separate word pages.
I am extract the table images from word document it extract table images along with text in last row.
So,please kindly help me to remove the text from the extracted image.
The source code source code.zip (706 Bytes)
The input Test.zip (1.1 MB)
The actual output output11a.zip (1.1 MB)
The expected output expected output.zip (1.1 MB)
Thanks & regards,
Priyanga G
@priyanga,
Thanks for your inquiry. Please remove the row’s text using following code snippet. Hope this helps you.
Table table = (Table)srcDoc.getChild(NodeType.TABLE, 0, true);
for (Cell cell : table.getLastRow().getCells()) {
cell.removeAllChildren();
cell.ensureMinimum();
}
Hi @tahir.manzoor,
Thanks for your feedback. ’
But still i am having the same error .could you please provide any other solution for this problem.
Thanks & regards,
Priyanga G
@priyanga,
Thanks for your inquiry. In your code, please replace following line of code
table.getLastRow().getLastCell().getRange().delete();
with
dstDoc1.getFirstSection().getBody().getTables().get(0).getLastRow().getRange().delete();
In your code, the table node belongs to source document (test.docx).