printing "DRAFT"

18 views
Skip to first unread message

JavaJones

unread,
May 5, 2008, 4:34:48 PM5/5/08
to Adobe LiveCycle Developers
Where do I find info on how to set up my xdp "print draft" button to
print the word DRAFT over my pdf when it prints out?

Emil Regelman

unread,
May 5, 2008, 7:14:30 PM5/5/08
to live...@googlegroups.com
My guess would be to include a text box on the master page, with code behind it to hide when not in draft mode (or show it when in draft mode!).

JavaJones

unread,
May 6, 2008, 10:28:46 AM5/6/08
to Adobe LiveCycle Developers
Well I think I may have found my own solution. It looks like the
Assembler service will do this using a DDX for the watermark. Has
anyone used this before for watermarks or headers? Any tips?

Emil Regelman

unread,
May 6, 2008, 10:43:24 AM5/6/08
to live...@googlegroups.com
Good question, but I do not know.  I'm not at all familiar with DDX.

Jono

unread,
May 6, 2008, 6:53:21 PM5/6/08
to Adobe LiveCycle Developers
On May 5, 1:34 pm, JavaJones <jlewis7...@gmail.com> wrote:
> Where do I find info on how to set up my xdp "print draft" button to
> print the word DRAFT over my pdf when it prints out?

I don't know if this is what you're after - but here's a function I
wrote for adding a watermark (found the info in the Javascript
reference). I call it from a menu item I created, but it should work
calling it from a button:

function ProofWatermark(){
this.addWatermarkFromText({
cText: "PROOF",
nScale: -1,
nRotation: 45,
aColor: ["RGB",0,1,1],
nOpacity: .5
});
}

JavaJones

unread,
May 7, 2008, 2:56:18 PM5/7/08
to Adobe LiveCycle Developers
Thanks Jono I'll give her a whirl.

JavaJones

unread,
May 7, 2008, 3:00:56 PM5/7/08
to Adobe LiveCycle Developers
Alas, the addWatermarkFromText does not work inside of LiveCycle
designer. Thanks though.

On May 6, 5:53 pm, Jono <jono.mo...@gmail.com> wrote:

Jono

unread,
May 7, 2008, 4:25:45 PM5/7/08
to Adobe LiveCycle Developers
On May 7, 12:00 pm, JavaJones <jlewis7...@gmail.com> wrote:
> Alas, the addWatermarkFromText does not work inside of LiveCycle
> designer. Thanks though.

Ah, I assumed you were trying to print from Acrobat. That script works
in Acrobat.

JavaJones

unread,
May 9, 2008, 10:47:08 AM5/9/08
to Adobe LiveCycle Developers
Instead of using the Assembler service this is what I've done.

I placed my "watermark" image in an image field on my form in
Livecycle Designer. I set it's presence to Visible (print only).
Under my print official button, I do not want the water mark to appear
here, I placed the following script:
Page1.imgDraft.presence = "invisible";

Then under my Print Draft button I used the following script:
Page1.imgDraft.presence = "visible";
Page1.imgDraft.relevant = "+print";

This places the watermark back to it's original state so that it will
print the watermark on the "DRAFT" copy.

I was trying to use an image before and the only way to affect it's
visibility (presence) was in the initialize event. Then I was never
able to reverse the visibility after that. The image field and text
field objects allow you to manipulate their presence in any of the
event categories.

And a tip for anyone trying to do this. The transparency and
Opaqueness of my image apparently didn't translate very well when I
pulled it into the xdp. So I had to "send the image to back" so it is
sitting behind my form. The png format is supposed to support
transparency but I don't think it does opaqueness. JPG doesn't support
either. And I think a tif file had a problem with transparency as
well.

fred.pantalone

unread,
May 11, 2008, 1:18:41 PM5/11/08
to Adobe LiveCycle Developers
Thanks for sharing this!
Reply all
Reply to author
Forward
0 new messages