Watermark that appears after a specific date

New Here ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

I'm responsible fo issuing controlled documents and want to have an "Expired" watermark appear on the document after a specific date.  Is this possible? If so, how can it be done.  Thanks.

TOPICS
How to

Views

148

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Doing it with an actual watermark is tricky. A better solution is to create a layer or field in advance and then show/hide it when the file is opened based on the current date, using a script.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 26, 2021 Apr 26, 2021

Copy link to clipboard

Copied

Thanks try67. I'll try that... after learning how to do it.  Any suggestions on how to create such a script or add it to the pdf, would be greatly appreciated!

 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Apr 26, 2021 Apr 26, 2021

Copy link to clipboard

Copied

Let's say you use a field for this, called "Expired", and that the cut-off date to show it is June 1st 2021.

Create the field with the expiration text as its default value and set it as read-only.

Then enter the following script under Tools - JavaScript - Document JavaScripts (not inside a function, though!):

 

var now = new Date();
var cutOffDate = util.scand("mm/dd/yyyy", "06/01/2021");
this.getField("Expired").display = (now.getTime()>cutOffDate.getTime()) ? display.visible : display.hidden;

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 29, 2021 Apr 29, 2021

Copy link to clipboard

Copied

It worked!  Took me a bit to figure out, but it worked. Thanks!

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines