Expand my Community achievements bar.

Watermarking an XFA PDF

Avatar

Level 2

Hi All,

Is it possible to watermark an XFA form? I tried using the addWatermarkFromText javascript function on my PDF but got the following error:

NotAllowedError: Security settings prevent access to this property or method.

Doc.addWatermarkFromText:52:XFA:form1[0]:page1[0]:docReady

I need to mark my PDF based on what server it is being launched from and as a result HAVE to watermark it to identify the regions.

Can anyone help? Is there any other way to watermark this without compromising on the size of the PDF?

Thanks.

2 Replies

Avatar

Level 8

The only way to watermark an XFA PDF (as far as I know) is to use Masterpages in LiveCycle Designer. If you need the watermark to be dynamically rendered at runtime, you can use script to show/hide/change the text of your watermark.

For example, assuming you have one masterpage:

1) In Designer, go to View>Master Pages

2) Add a text field without a caption and no appearance

3) Under the Value tab in the Object palette put in a default value to help with size/position, set type to Protected

4) Make sure Expand to fit height and width is selected

5) In the layout:ready event of the field put; this.rawValue=vYourStringValueHere;

If anyone knows of any better ways we'd like to hear it.

Hope that helps.

Kyle

Avatar

Level 10

And you'll probably only see it where there are no fills or backgrounds.