I am using Aspose.Words for java version 14.7.0.
I am creating a word document using the DocumentBuilder. I have a tables that have paragraphs in them. In order to apply paragraph styles to the paragraphs I use the DocumentBuilder.writeLn() method. This is causing an empty paragraph
at the end of a table. If I don’t use the DocumentBuilder.writeln() method the paragraph will not retain the style I associated with it. I then tried to identify the empty paragraphs and remove them but I was not successful.
This empty paragraph is causing an issue in my word document. How do I remove the empty paragraphs or how to get the style to apply to text without having to use the writeln() method.
<w:tbl>
<w:tblPr>
<w:tblStyle w:val=“TableNormal” />
<w:tblW w:w=“5000” w:type=“pct” />
<w:tblBorders>
<w:top w:val=“nil” />
<w:left w:val=“nil” />
<w:bottom w:val=“nil” />
<w:right w:val=“nil” />
<w:insideH w:val=“nil” />
<w:insideV w:val=“nil” />
</w:tblBorders>
<w:tblCellMar>
<w:left w:w=“108” w:type=“dxa” />
<w:right w:w=“108” w:type=“dxa” />
</w:tblCellMar>
</w:tblPr>
<w:tblGrid>
<w:gridCol w:w=“432” />
<w:gridCol w:w=“8208” />
</w:tblGrid>
<w:tr>
<w:tblPrEx>
<w:tblW w:w=“5000” w:type=“pct” />
<w:tblBorders>
<w:top w:val=“nil” />
<w:left w:val=“nil” />
<w:bottom w:val=“nil” />
<w:right w:val=“nil” />
<w:insideH w:val=“nil” />
<w:insideV w:val=“nil” />
</w:tblBorders>
<w:tblCellMar>
<w:left w:w=“108” w:type=“dxa” />
<w:right w:w=“108” w:type=“dxa” />
</w:tblCellMar>
</w:tblPrEx>
<w:tc>
<w:tcPr>
<w:tcW w:w=“250” w:type=“pct” />
</w:tcPr>
<w:p>
<w:pPr>
<w:pStyle w:val=“ACTParagraph” />
<w:jc w:val=“left” />
</w:pPr>
</w:p>
</w:tc>
<w:tc>
<w:tcPr>
<w:tcW w:w=“4750” w:type=“pct” />
</w:tcPr>
<w:p>
<w:pPr>
<w:pStyle w:val=“ACTParagraph” />
<w:jc w:val=“left” />
</w:pPr>
<w:r>
<w:t>Employees are encouraged to fulfill their civic responsibilities by serving as jurors when summoned and will be given time off to do so. Employees who receive a jury duty summons are required to provide [EMPLOYER NAME</w:t>
</w:r>
<w:r>
<w:t>]</w:t>
</w:r>
<w:r>
<w:t xml:space=“preserve”> with a copy of the summons as soon as possible so that arrangements may be made to accommodate the employees</w:t>
</w:r>
<w:r>
<w:t>’</w:t>
</w:r>
<w:r>
<w:t xml:space=“preserve”> absence. [Employees may use any available paid time off for jury duty [extending beyond [NUMBER</w:t>
</w:r>
<w:r>
<w:t>]</w:t>
</w:r>
<w:r>
<w:t xml:space=“preserve”> days</w:t>
</w:r>
<w:r>
<w:t>]</w:t>
</w:r>
<w:r>
<w:t>.</w:t>
</w:r>
<w:r>
<w:t>]</w:t>
</w:r>
<w:r>
<w:t xml:space=“preserve”> Employees and/or [EMPLOYER NAME</w:t>
</w:r>
<w:r>
<w:t>]</w:t>
</w:r>
<w:r>
<w:t xml:space=“preserve”> may request that the employees be excused from jury duty if either believes that the employees</w:t>
</w:r>
<w:r>
<w:t>’</w:t>
</w:r>
<w:r>
<w:t xml:space=“preserve”> absence would create serious operational difficulties.</w:t>
</w:r>
</w:p>
<w:p />
</w:tc>
</w:tr>
</w:tbl>