Add a watermark using "addWatermarkFromText"

678 views
Skip to first unread message

Chris

unread,
Apr 9, 2008, 10:37:17 AM4/9/08
to Adobe LiveCycle Developers
Hi all,

I've place this code in the ready: layout event of the form:

var myDoc = event.target;
myDoc.addWatermarkFromText("Confidential", 0, font.Helv, 24,
color.red);

When I open the form as a PDF i receive the following error in the
JavaScript Debugger:

NotAllowedError: Security settings prevent access to this property or
method.
Doc.addWatermarkFromText:3:XFA:form1[0]:#subform[0]:ready


Any ideas how to solve this?


Regards,


Chris Fourie

Bob Bailey

unread,
Apr 9, 2008, 12:07:09 PM4/9/08
to Adobe LiveCycle Developers
Is there a reason you need to do this programmatically? Could you
just add an image to the master page of the form?

Chris Fourie

unread,
Apr 9, 2008, 12:18:14 PM4/9/08
to live...@googlegroups.com

Hi Bob,

 

Thanks for the reply.

 

The reason why I use code is that the text fields' fill colour are solid white. The form have quite a few text fields on and you can't see the whole image if I add it to the master page.

 

Chris Fourie

CE-mail chris...@gmail.com 

 Cell +27 (0) 72 428 2465

CFax +27 (0) 86 510 2566

John Nesbitt

unread,
Apr 10, 2008, 7:29:00 PM4/10/08
to Adobe LiveCycle Developers
I think you need to Reader Extend the form to add a watermark to a PDF
that is opened in Adobe Reader. If you don't already have it, download
a trial version of Acrobat Professional and see if you get the
security error when you open the document with that (I suspect you
won't).

If you don't get it, you need to buy a Reader Extensions license for
the document or, if you are only distributing the form to less than
500 people (see the EULA for more specific details), a copy of Acrobat
Professional will allow you to Reader Extend the form.

John.

On Apr 10, 2:18 am, "Chris Fourie" <chrisfo...@gmail.com> wrote:
> Hi Bob,
>
> Thanks for the reply.
>
> The reason why I use code is that the text fields' fill colour are solid
> white. The form have quite a few text fields on and you can't see the whole
> image if I add it to the master page.
>
> Chris Fourie
>
> CE-mail chrisfo...@gmail.com
> On 09/04/2008, Bob Bailey <bbail...@gmail.com> wrote:
>
>
>
>
>
> > Is there a reason you need to do this programmatically?  Could you
> > just add an image to the master page of the form?
>
> > On Apr 9, 10:37 am, Chris <ChrisFo...@gmail.com> wrote:
> > > Hi all,
>
> > > I've place this code in the ready: layout event of the form:
>
> > > var myDoc = event.target;
> > > myDoc.addWatermarkFromText("Confidential", 0, font.Helv, 24,
> > > color.red);
>
> > > When I open the form as a PDF i receive the following error in the
> > > JavaScript Debugger:
>
> > > NotAllowedError: Security settings prevent access to this property or
> > > method.
> > > Doc.addWatermarkFromText:3:XFA:form1[0]:#subform[0]:ready
>
> > > Any ideas how to solve this?
>
> > > Regards,
>
> > > Chris Fourie- Hide quoted text -
>
> - Show quoted text -

Duane Nickull

unread,
Apr 11, 2008, 11:28:12 AM4/11/08
to live...@googlegroups.com
I think that Policy server’s watermarks work with Reader without ARES.  

D

--
**********************************************************************
"Speaking only for myself"
Senior Technical Evangelist - Adobe Systems, Inc.
Blog - http://technoracle.blogspot.com
Community Music - http://www.mix2r.com
My Band - http://www.myspace.com/22ndcentury
Adobe MAX 2008 - http://technoracle.blogspot.com/2007/08/adobe-max-2008.html
**********************************************************************
Reply all
Reply to author
Forward
0 new messages