Docx to Pdf/Html/Doc/Jpep/Png: additional (Bottom) Margin in Table Rows

When I generate a document from a docx template, additional margin is added to each table row during conversion. This additional margin was not in the conversion input (template).
The template contains MergeFields and custom replacement tags. These are processed before the document is converted.
If docx is the output format no additional margin is added, thus the table looks as expected. But if the output format is pdf, jpeg, doc or html the addtional margin is added on every row.
In the html formated output, I saw the addtional margin defined as following: margin:0pt 0pt 10pt. In contrast the margin of correctly rendered tables is margin:0pt.
But this addtional margin is not added to every table. You will find examples at the end of the generated documents.
I am using Aspose.Words 10.3.0. You will find the template (Template.docx) and the generated documents (Generated_Doc.*) in the attached Zip.

Thank you for reporting this problem to us. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is resolved.
Best regards,

Thanks for your reply. Is there a workaround available until this issue is fixed?

Thanks for your request. The only thing I can suggest you is looping through all paragraphs and setting SpaceAfter and LineSpacing manually:

Document doc = new Document("C:\\Temp\\in.docx");
// Loop through all paragraphs
foreach(Paragraph paragraph in doc.GetChildNodes(NodeType.Paragraph, true))
    // Set SpaceAfter to zero
    paragraph.ParagraphFormat.SpaceAfter = 0;
    paragraph.ParagraphFormat.LineSpacingRule = LineSpacingRule.AtLeast;
    paragraph.ParagraphFormat.LineSpacing = 12;

Best regards,

Your workaround works very well.
Thanks for this quick solution.

The issues you have found earlier (filed as WORDSNET-5127) have been fixed in this .NET update and this Java update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.