[
https://issues.apache.org/jira/browse/FOP-2844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18083650#comment-18083650
]
Joao Goncalves edited comment on FOP-2844 at 5/26/26 10:14 PM:
---------------------------------------------------------------
This might be fixed already. Using the example you provided, I generated a PDF
with the following encryption settings: !image-2026-05-26-17-12-47-095.png!
I was able to have other restrictions at will as well, without having a need to
add all the restrictions at once.
[~skyanth] Let me know if it's still a problem or not.
was (Author: JIRAUSER302961):
This might be fixed already. Using the example you provided, I generated a PDF
with the following encryption settings: !image-2026-05-26-17-12-47-095.png!
I was able to have other restrictions at will as well, without having a need to
add all the restrictions at once.
> FOP ignores encryption parameters except when you enter the full set
> --------------------------------------------------------------------
>
> Key: FOP-2844
> URL: https://issues.apache.org/jira/browse/FOP-2844
> Project: FOP
> Issue Type: Bug
> Affects Versions: 2.3
> Environment: MacOS 10.14.2, not tested on other systems
> Reporter: Patricia Piolon
> Priority: Major
> Attachments: image-2026-05-26-17-12-47-095.png
>
>
> It looks like FOPs encryption parameters don't work as one would expect.
> (I am providing configuration options below, but *the same is true for
> command line options*)
> They only work when providing the full set of options:
> <encryption-params>
> <encryption-length>128</encryption-length>
> <user-password>testuserpass</user-password>
> <owner-password>testownerpass</owner-password>
> <noprint/>
> <nocopy/>
> <noedit/>
> <noannotations/>
> <nofillinforms/>
> <noaccesscontent/>
> <noassembledoc/>
> <noprinthq/>
> </encryption-params>
> the above gives a fully restricted pdf, but this:
> <encryption-params>
> <encryption-length>128</encryption-length>
> <user-password>testuserpass</user-password>
> <owner-password>testownerpass</owner-password>
> <noprint/>
> </encryption-params>
> does *not* result in a pdf where printing is disallowed but e.g. annotating
> is. The no-printing option is not set in this case.
> The only elements/options that can be left out are the user and owner
> passwords.
> So this works:
> <encryption-params>
> <encryption-length>128</encryption-length>
> <noprint/>
> <nocopy/>
> <noedit/>
> <noannotations/>
> <nofillinforms/>
> <noaccesscontent/>
> <noassembledoc/>
> <noprinthq/>
> </encryption-params>
> But this does not:
> <encryption-params>
> <encryption-length>128</encryption-length>
> <noprint/>
> </encryption-params>
>
> Additionally it is not possible to only set the list of <no*/> encryption
> options in the configuration and then set the user and/or owner password at
> runtime - in this case the passwords are ignored.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)