Blank Space in a row

Hi,
Please find attached a screenshot of a generated document, which has a region that facilitates iteration of rows in a table.The issue is that, though there is no data, there is a block of blank space that is inserted in each and every row.The template doesn’t have this extra space.
It would be great if you can tell me why and how this space is being inserted and how to remove it.
Regards,
Pavithra V.S

Hi

Thanks for your request. Maybe, you should just remove empty paragraphs from the end of the cell. For example, see the following code:

// Open the document
Document doc = new Document("C:\\Temp\\in.doc");
// Get table
Table table = doc.getFirstSection().getBody().getTables().get(0);
// Get cell where we should remove empty paragraphs for the end
Cell cell = table.getRows().get(0).getCells().get(0);
// Remove empty paragraphs from the end of the cell
while (cell.getLastParagraph() != null && !cell.getLastParagraph().hasChildNodes())
    cell.getLastParagraph().remove();
// Save output document
doc.save("C:\\Temp\\out.doc");

Hope this helps.
Best regards.

Hi Alexey,
Thanks for the very quick reply!
But, this doesn’t seem to work.The space still is inserted.
Regards,
Pavithra V.S

Hi

Thanks for your request. I did not promise that this code will work in all cases. I had no chance to check the code with your document since you did not attach it. Could you please attach your document here? I will check it on my side and provide you more information.
Best regards.