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

Signing external signed document again with pdfbox, break the document.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 1.8.0, 1.8.1, 1.8.2
    • Fix Version/s: None
    • Component/s: Signing
    • Environment:
      Windows 8.1

      Description

      1/ I sign a file using this method

      public static void signByPdfbox(
      File inputPDF,
      File outputPDF,
      KeyStore ks,
      String password)
      throws IOException, UnrecoverableKeyException, KeyStoreException, NoSuchAlgorithmException, COSVisitorException, SignatureException

      { PDDocument inputDoc = PDDocument.load(inputPDF); PADESSigner signer = new PADESSigner(ks, password); signer.setSignatureName("Hello1"); signer.setSignatureReason("Why noy"); signer.setSignatureLocation("Curacao"); signer.setSignatureContactInfo("david.keller.fr@gmail.com"); signer.signPDF(inputDoc, outputPDF); }

      2/ I resign the same file using the same method and in acrobat reader I have this error : SignDict/Contents illegal data

      I have googelized it, and I found only old topics for iText lib.
      I have tried the same with iText 5.X, and double signatures works

        Attachments

        1. contract_signed_Cryptolog.pdf
          263 kB
          Thomas Chojecki
        2. contract.pdf_signedPdfBox.pdf
          301 kB
          David KELLER
        3. contract.pdf_signedIText.pdf
          297 kB
          David KELLER
        4. contract.pdf
          263 kB
          David KELLER
        5. PADESSigner.java
          7 kB
          David KELLER

          Issue Links

            Activity

              People

              • Assignee:
                tchojecki Thomas Chojecki
                Reporter:
                david.keller David KELLER
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: