Border missing against image in PDF from Document template

We have migrated from Aspose.Words Java v15.3 to V22.6 due to license file read issues.
After migrating we noticing that on the new version the pdf generated from Document template using MailMerge action and convert to pdf, is having cell border missing on cells with image.
I see similar issue mentioned in Prevent an Inline Image Nested in a Table Cell from Overlapping the Cell Border during DOC to PDF Conversion using C#, where it says the issue is fixed in Aspose.Words Java v20.7. However I am still seeing this issue.
Do we need to do any code modification for the same ?
PFA the files in use along with example outputsample.zip (7.4 MB)

@ashwath As I can see the current version behaves the same way as MS Word does. I reproduced the behavior using the following code:

Document doc = new Document("C:\\Temp\\in.docx");
doc.getMailMerge().deleteFields();
doc.save("C:\\Temp\\out.docx");
doc.save("C:\\Temp\\out.pdf");

Then I converted the produced DOCX document to PDF using MS Word and the image also overlaps the table border:
ms.pdf (267.2 KB)
out.pdf (126.9 KB)

Hi @alexey.noskov
Did you find that its overlapping with 15.3 version ? Coz in our case we didn’t see image overlap causing missing border on this version (screenshot shown in info.docx file).
Any suggestions to look at ? so that cell bottom border doesn’t get missed.

@ashwath Yes, I see the border is not overlapped by the image in 15.3 version, but the result does not match MS Word, so is incorrect.
I would suggest you to modify your template and make the image in the table inline. In this case it is rendered properly. Please see the attached modified template: in.docx (7.0 MB)

Thanks @alexey.noskov.

1 Like