Skip to main content
Skip table of contents

pdfOffice: improved conversion of docx files with repeating table header on new page

With the release of iText 7.2.2 and pdfOffice 2.0.2, we improved the conversion of docx files where a table extends to a new page. Previously, such files would result in converted documents with a table which on subsequent pages did not contain all of the cells in the table header. This has now been resolved.

Below is a Java example demonstrating such a conversion:

Java

JAVA
    public static void main(String[] args) throws IOException {
        // Load License Key
        LicenseKey.loadLicenseFile(new File("LicenseKey.json"));
        // Create the input and output files
        File demoFile = new File("repeatAsTableHeaderRow.docx");
        File pdfOutFile = new File("outputFileWithRepeatingTableHeaderRow.pdf");
        // Convert the docx file to PDF
        OfficeConverter.convertOfficeDocumentToPdf(demoFile, pdfOutFile);

        System.out.println("Your PDF File was successfully created!");
    }

Resources

You can find the input .docx file and the output PDF file below. If you download both files and compare them, you will find that the table header cells on the second page are identical.  

repeatAsTableHeaderRow.docx  outputFileWithRepeatingTableHeaderRow.pdf 




JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.