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

Signing example does not work if inFile = outFile

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.5
    • Fix Version/s: None
    • Component/s: Signing
    • Labels:
      None
    • Environment:
      Mac, JDK8

      Description

      Hi,

      I tried using the Signature example (https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/signature/) which works great for certifying pdfs.

      However if I want to certify and replace the original pdf without creating a new one (like foo_signed.pdf should only be foo.pdf), I get an exception:

      `Exception in thread "main" java.io.IOException: Error: End-of-File, expected line pdfbox`

      I invoked the method like this (L215 of CreateSignature.java):
      `signing.signDetached(inFile);`

      How would I change the example so that I can certify pdfs without creating copy files?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ManuSchiller Manu Schiller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: