Jump to content
  • Bottom Margin of Docx Output Seems to Be Subtracted by 0.25 inches from template

    CategoryBug report
    StatusFeedback Requested

    My Jasper Report template is an A4 portrait with 0.5 in margins all sides. When DOCX is generated from it via library (with only special setting being setting frames as nested tables), the output has 0.5 margins in all sides except for the bottom which has 0.25. I increased the margin of the bottom in the template to 0.75 and the output had 0.5 bottom margin. I also tried via the eclipse Jasper Studio plugin exporter and same behaviour as with library.


    Using Version 6.4.3

    User Feedback

    Recommended Comments

    If you have a footer, the footer space will be reserved even if no footer data is printed on each page.


    I got around this by putting my footer on the background. The background prints everything on a separate layer. However, for this to work, you have to make sure your detail doesn't print long on pages where the footer is supposed to appear.

    Link to comment
    Share on other sites



    I can confirm this issue. We also found that if page margins specified in Jasper template, the bottom margin is subtracted by 0.25 inches. After some investigation, we found that this is done intentionally - DocxDocumentHelper.exportSection method subtracts the DEFAULT_LINE_PITCH (360 twips = 0.25 inch) value from the evaluated bottom margin.


    I think this is done in order to solve the empty page at the DOCX report end problem – some extra space is required to fit the last empty paragraph into the last page (see the attached screenshot).


    Link to comment
    Share on other sites

  • Create New...