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

Saving XFA document caused prompt saying Extended features has been disabled

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.9, 2.0.0
    • 2.0.22, 3.0.0 PDFBox
    • AcroForm
    • None
    • Windows, Linux

    Description

      Using the following code to read and write back a pdf (with xfa) caused the newly written pdf when opened be prompted with
      "This document enabled extended features in Adobe Reader. The document has been changed since it was created and use of extended features is no longer available. Please contact the author for the original version of this document".

      File f1 = new File(...);
      
      PDDocument doc = PDDocument.load(f1);
      doc.setAllSecurityToBeRemoved(true);
      
      File f = new File(....); // output file
      try (FileOutputStream fos = new FileOutputStream(f)) {
         doc.save(fos);
      }
      

      Attachments

        1. sample.pdf
          238 kB
          Toby Jee

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tmjee Toby Jee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: