Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4172

Flatten fails on first form element only

    XMLWordPrintableJSON

    Details

      Description

      I've create an PDF form using LibreOffice 5. For this document, the first form element refuses to turn up filled when filling + flattening using PDFBox 2.0.9 als well as trunk (512d016ad08a70dfb512f99d54092f8b586e8345).

      It turns out that resolveNeedsTranslation does not encounter any PDFormXObject for the first element of this pdf form element but still returns false, although translation is still needed.

      I've created a patch in https://github.com/michael-dev/pdfbox/tree/bugfix/flattenCorrectly .

      I used evince 3.18.2 on ubuntu xenial as pdf viewer. Please see attached example pdf form and the different results using pdfbox 2.0.9 and with the above patch applied. The code used here is in example.java.

        Attachments

        1. example.java
          1 kB
          Mathias Brökelmann
        2. example-filled-2.0.9.pdf
          395 kB
          Mathias Brökelmann
        3. example-filled-fixed.pdf
          395 kB
          Mathias Brökelmann
        4. example.pdf
          397 kB
          Mathias Brökelmann
        5. PDFBOX-4172-filled.pdf
          399 kB
          Tilman Hausherr

          Issue Links

            Activity

              People

              • Assignee:
                msahyoun Maruan Sahyoun
                Reporter:
                mbr Mathias Brökelmann
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: