You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2014/11/26 18:20:12 UTC

[jira] [Closed] (PDFBOX-2510) Getting "Error: The supplied password does not match either the owner or user password in the document." while trying to parse pdf without password in

     [ https://issues.apache.org/jira/browse/PDFBOX-2510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tilman Hausherr closed PDFBOX-2510.
-----------------------------------
    Resolution: Duplicate

I am closing this as because it works with both parsers in the latest 1.8.8 snapshot.

If it still doesn't work, then reopen and post the exact link that you used for the PDFBox snapshot, and again with the full exception stack trace, and mention which parser settings you are using.

The latest 1.8 build is build# 147, that one works with both parsers (after fixing PDFBOX-2522), previous ones only with the nonSeq parser. Good luck!

> Getting "Error: The supplied password does not match either the owner or user password in the document." while trying to parse pdf without password in 
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: PDFBOX-2510
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-2510
>             Project: PDFBox
>          Issue Type: Bug
>          Components: Parsing
>    Affects Versions: 1.8.8
>            Reporter: Ekaterina
>         Attachments: DV.pdf
>
>
> I have a pdf that was correctly parsed for some time and suddenly I've got "javax.crypto.BadPaddingException: Given final block not properly padded" when I tried to parse it with pdfbox-1.8.7. Then I tried pdfbox-1.8.8-SNAPSHOT and I've got "Error: The supplied password does not match either the owner or user password in the document.". Here is the code I'm using:
> ContentHandler handler = new BodyContentHandler(400000);
> 		Metadata metadata = new Metadata();
> 		Parser parser = new AutoDetectParser();
> 		try (TikaInputStream stream = TikaInputStream.get(input)) {
> 			parser.parse(stream, handler, metadata, new ParseContext());
> 		} catch (IOException | SAXException | TikaException e) {
> 			LOG.error("Could not parse the input document", e);
> 		}
> 		return handler.toString();
> (I am using it with tika-parsers-1.6)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)