[
https://issues.apache.org/jira/browse/PDFBOX-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17872179#comment-17872179
]
Tilman Hausherr commented on PDFBOX-5866:
-----------------------------------------
This code change fixes it:
{code}
if (dicRevision == REVISION_5 || dicRevision == REVISION_6)
{
passwordCharset = StandardCharsets.UTF_8;
ue = Arrays.copyOf(encryption.getUserEncryptionKey(), 32);
oe = Arrays.copyOf(encryption.getOwnerEncryptionKey(), 32);
}
{code}
Of course that's all dumb and brute force, I'll have to find out why this works
and read the spec 😂
> Unable to load password protected pdf
> --------------------------------------
>
> Key: PDFBOX-5866
> URL: https://issues.apache.org/jira/browse/PDFBOX-5866
> Project: PDFBox
> Issue Type: Bug
> Reporter: Charles D
> Priority: Major
> Attachments: pdfbox_invalid_pwd.pdf
>
>
> PDFBox is unable to load password protected pdf. Error is "Invalid AES key
> length: 48 bytes."
> Adobe and qpdf are able to successfully open it , but many other applications
> I've tried are unable to do so.
> The pdf is created by a third party scanner so unfortunately we have no
> insight/control over its creation.Â
> [^pdfbox_invalid_pwd.pdf] . Please let me know the best way to provide the
> password.Â
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]