Search code examples
apache-fopdocx4j

docx4j: pdf export adds leading spaces


Wile exporting a simple docx file to pdf, docx4j is adding leading spaces (see: picture). I use following libraries:

    <dependency>
        <groupId>org.docx4j</groupId>
        <artifactId>docx4j</artifactId>
        <version>6.1.2</version>
    </dependency>
    <dependency>
        <groupId>org.docx4j</groupId>
        <artifactId>docx4j-export-fo</artifactId>
        <version>8.1.3</version>
    </dependency>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.1</version>
    </dependency>

generated pdf


Solution

  • I suspect this is caused by https://github.com/plutext/docx4j-export-FO/commit/4451111aa02a698ed54788299513f7eac74bd996 which will need to be reverted.