You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by sspeights <Sc...@haufe-lexware.com> on 2010/12/14 11:00:03 UTC

PDF encryption settings and enabling comments

Hello, 
I was on the site the other day and noticed that it is possible to configure
the PDF renderer to activate / deactivate PDF security settings. Is there a
complete documentation for how to do this with FOP on the web somewhere. I
am interesting in activating comments in my generated PDF documents. Is this
possible? 

Many Thanks, 
  Scott Speights
-- 
View this message in context: http://old.nabble.com/PDF-encryption-settings-and-enabling-comments-tp30453307p30453307.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF encryption settings and enabling comments

Posted by Chris Bowditch <bo...@hotmail.com>.
On 14/12/2010 10:00, sspeights wrote:

Hi,

> Hello,
> I was on the site the other day and noticed that it is possible to configure
> the PDF renderer to activate / deactivate PDF security settings. Is there a
> complete documentation for how to do this with FOP on the web somewhere. I
> am interesting in activating comments in my generated PDF documents. Is this
> possible?

PDF Encryption is described on the FOP website here: 
http://xmlgraphics.apache.org/fop/1.0/pdfencryption.html

You can disable editing of annotations, but you can edit them by 
default. However, I think you need Acrobat Pro for editing annotations. 
Acrobat Reader can't add/amend annotations.

Thanks,

Chris
> Many Thanks,
>    Scott Speights


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: PDF encryption settings and enabling comments

Posted by Lo...@log-net.com.
I set this up a while ago and it is a little brief, but this is how I did 
security (FOP 0.94):


Set up user agent:

        FOUserAgent userAgent = fopFactory.newFOUserAgent();

Set up security parms:

        private String ownerPW = "somepw";
        private String userPW = "someotherpw";
        private boolean allowPrint = true;
        private boolean allowCopy = true;
        private boolean allowEdit = true;
        private boolean allowEditA = true;

Add security parms to user agent:

        userAgent.getRendererOptions().put("encryption-params", new 
PDFEncryptionParams((ownerPW.trim().equals("")?null:ownerPW), 
(userPW.trim().equals("")?null:userPW), allowPrint, allowCopy, allowEdit, 
allowEditA));

Create FOP object with user agent:

        Fop fop = fopFactory.newFop(outputType,userAgent,out);

Do the rest of your FOP stuff.

That's all I have - hope it helps.

-Lou


sspeights <Sc...@haufe-lexware.com> wrote on 12/14/2010 05:00:03 
AM:

> 
> Hello, 
> I was on the site the other day and noticed that it is possible to 
configure
> the PDF renderer to activate / deactivate PDF security settings. Is 
there a
> complete documentation for how to do this with FOP on the web somewhere. 
I
> am interesting in activating comments in my generated PDF documents. Is 
this
> possible? 
> 
> Many Thanks, 
>   Scott Speights
> -- 
> View this message in context: http://old.nabble.com/PDF-encryption-
> settings-and-enabling-comments-tp30453307p30453307.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>