Skip to content

The supplied password does not match either the owner or user password in the document. #26

@ghost

Description

How do I supply a password for a password protected PDF?

I am getting this error:

*** Reading ./data/attachments/dasd.pdf
INFO - Document is encrypted
[Fatal Error] :1:1: Content is not allowed in prolog.
Exception in thread "main" org.apache.tika.exception.TikaException: Unable to extract PDF content
    at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:146)
    at org.apache.tika.parser.pdf.PDFParser.parse(PDFParser.java:159)
    at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:244)
    at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:244)
    at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:121)
    at org.apache.tika.cli.TikaCLI$OutputType.process(TikaCLI.java:143)
    at org.apache.tika.cli.TikaCLI.process(TikaCLI.java:407)
    at org.apache.tika.cli.TikaCLI.main(TikaCLI.java:116)
Caused by: org.apache.pdfbox.exceptions.WrappedIOException: Error decrypting document, details: 
    at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:341)
    at org.apache.tika.parser.pdf.PDF2XHTML.process(PDF2XHTML.java:130)
    ... 7 more
Caused by: org.apache.pdfbox.exceptions.CryptographyException: Error: The supplied password does not match either the owner or user password in the document.
    at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.prepareForDecryption(StandardSecurityHandler.java:264)
    at org.apache.pdfbox.pdmodel.encryption.StandardSecurityHandler.decryptDocument(StandardSecurityHandler.java:156)
    at org.apache.pdfbox.pdmodel.PDDocument.openProtection(PDDocument.java:1597)
    at org.apache.pdfbox.pdmodel.PDDocument.decrypt(PDDocument.java:943)
    at org.apache.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:337)
    ... 8 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions