pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stan Ivaciov <sivac...@accusoft.com>
Subject Re: PdfBox 1.8 Possibly Does Not Consider Revision Number of Security Handler
Date Fri, 30 Sep 2016 19:37:23 GMT
Hello Tilman,

Thanks for the response.

Attached are the file, screnshot of the Acrobat DC Pro Security Settings
and their comparison to the PDF Box Debugger.

[image: Inline image 1]

[image: Inline image 2]






Best regards,
Stan

On Fri, Sep 30, 2016 at 11:57 AM, Tilman Hausherr <THausherr@t-online.de>
wrote:

> You're right that PDFBox does not consider the revision. Code excerpt:
>
>         else if( isUserPassword(password.getBytes(passwordCharset),
> userKey, ownerKey,
>                            dicPermissions, documentIDBytes, dicRevision,
>                            dicLength, encryptMetadata) )
>         {
>             currentAccessPermission = new AccessPermission(dicPermission
> s);
>
>
> "dicPermissions" is the value of the /Encrypt/P entry. "dicRevision" is
> the value of the /Encrypt/R entry and obviously, it isn't used when the
> AccessPermission is initialized.
>
> I've not fully understood your text: what do you mean with 'bitwise
> "Encrypt Flag"' ? Do you mean the /Encrypt/P entry?
>
> If you are working on something, please open an issue and submit the
> patch, so that the work isn't done twice.
>
> I'd also be interested in a test file to better understand the problem.
>
> Tilman
>
> PS: The 1.8 version is outdated. Use 2.0.3.
>
>
> Am 29.09.2016 um 22:51 schrieb Stan Ivaciov:
>
>> Thank you for a great PDF tool. We have come up against a small issue
>> while testing encrypted documents with restrictions for filling out forms
>> set.
>>
>> The PDF spec, http://www.adobe.com/content/d
>> am/Adobe/en/devnet/acrobat/pdfs/PDF32000_2008.pdf, pages 59-61,
>> describes that bit 9 "/can fill in form fields/" can only be considered by
>> Security Handlers of revision 3 or greater. Older versions should rely on
>> bit 6, see perm_spec.png^<https://jira.accusoft.com/secure/attachment/
>> 54791/54791_perm_spec.png>, perm_spec_Rev.png^<https://jir
>> a.accusoft.com/secure/attachment/54792/54792_perm_spec_Rev.png>
>>
>> (The idea described in the spec is that granulation of permissions is
>> extended with revision, and up to 2008 year it has 4 revisions, from 1 to
>> 4, and our PDF sample has only 2-nd revision, which is seen by PDFBOX).
>>
>> Could you please confirm our overall conclusion: PDFBox does not support
>> this bit at the moment and to imitate Acrobat behaviour and fix this issue
>> outside of PDFBox; we need to add a logic which would be considering both
>> bitwise "Encrypt Flag" and the Revision Number of Security Handler.
>>
>> Maybe this also could be an improvement in one of the future PDFBox
>> release.
>>
>>
>> Best regards,
>>
>> Stan
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
>> For additional commands, e-mail: users-help@pdfbox.apache.org
>>
>
>
>

Mime
View raw message