JasperReports add native docx footer

19 views Asked by At

I am strugling with adding REAL footer into docx document that are generated by Jasper reports.

I've defined pageFooter section:

        <pageFooter>
    <band height="40" splitType="Stretch">
        <textField pattern="" isBlankWhenNull="false">
            <reportElement key="textField" mode="Opaque" x="310" y="0" width="100" height="20" forecolor="#000000" backcolor="#FFFFFF" uuid="c8484943-2140-48d4-b492-63617eec9826"/>
            <textElement textAlignment="Right" verticalAlignment="Top" rotation="None">
                <font fontName="Monospaced" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="Courier" pdfEncoding="Cp1252" isPdfEmbedded="false"/>
                <paragraph lineSpacing="Single"/>
            </textElement>
            <textFieldExpression><![CDATA["Page " + String.valueOf($V{PAGE_NUMBER}) + " of"]]></textFieldExpression>
        </textField>
    </band>
</pageFooter>

But after creating docx document it is at the bottom of page, but not as MS Office footer elemnent - that causes issues when users edit generated document.

I am looking for tips how can I create native docx footer from JasperReports template (might be with 3rd party libraries)

0

There are 0 answers