[ 
https://issues.apache.org/jira/browse/PDFBOX-3590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15691424#comment-15691424
 ] 

Tilman Hausherr commented on PDFBOX-3590:
-----------------------------------------

Please add {{setCanModifyAnnotations(false);}} and test again.

The specification and/or our documentation is confusing:
{quote}
Bit 6: Add or modify text annotations, fill in interactive form fields, and, if 
bit 4 is also set, create or modify interactive form fields (including 
signature fields).

Bit 9: (Security handlers of revision 3 or greater) Fill in existing 
interactive form fields (including signature fields), even if bit 6 is clear.
{quote}

You had unset bit 9 but set bit 6.

> AccessPermission not applied
> ----------------------------
>
>                 Key: PDFBOX-3590
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3590
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.3
>            Reporter: Maelig Gohin
>         Attachments: no_flatten_only_permissions_restrictions.pdf
>
>
> Using PdfBox 2.0.3 from maven repository.
> I modified a PDF with Adobe Pro to add editable fields that I can edit with 
> PdfBox in JAVA.
> Everything works well but I wanted to set the document as read-only so people 
> downloading the generated pdf could not change values.
> So I followed https://pdfbox.apache.org/2.0/cookbook/encryption.html but it's 
> not working.
> Here is my method 
> https://gist.github.com/mgohin/b09fed91e7475c09326d1ae25686dcd1



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to