Avg. Rating 4.0

Problem

Need to have .pdf files state when they were printed and state that it expires seven days later, in the header.

Solution

You can accomplish this task by using the 'addWatermarkFromText' action

Detailed explanation

You can display the date by using the add water mark tool,  'addWaterMarkFromText()'.  The date will be displayed when a user prints the document. The script will be like :


this.addWatermarkFromText({
cText: "Document content expires 7 days from " + util.printd("mmm dd, yyyy", new Date()),
nTextAlign: app.constants.align.center,
nHorizAlign: app.constants.align.center,
nVertAlign: app.constants.align.center,
nOpacity: 0.5
});

 

The above script will display the print date and the expiry date is set for 7 days.

 

Bobby Johnson.


 


+
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

Report abuse

Related recipes