pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Lehmkühler <andr...@lehmi.de>
Subject Re: How to decrypt a PDF document when supplied an owner password
Date Tue, 19 Aug 2014 10:07:49 GMT
Hi,

> Balaji Venkatamohan <bvenkata@tibco.com> hat am 18. August 2014 um 23:33
> geschrieben:
>
>
> I want to know if PdfBox provides an option to decrypt a PDF document given
> its owner password and not its user password?
>
> I use :
>
> DecryptionMaterial decryptionMaterial = new
> StandardDecryptionMaterial("owner_password");
> document.openProtection(decryptionMaterial);
>
> I searched the net but could not find a matching issue. If it is a repeat
> question and if there already exists a solution to this, please provide me
> the link to the issue.
You should simply use something like the following:

document.decrypt("owner_password");

> Thanks,
> Balaji

BR
Andreas Lehmkühler

Mime
View raw message