Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Obsolete date & time when printed. How can I set this up?

Guest
Jun 28, 2016 Jun 28, 2016

I work at an academic facility which is regulated by the FDA. We have standard operating procedures (SOPs) in PDF format which we need to controlled, meaning, if a PDF of an SOP is printed, I need to automatically stamp it with a "Print date/time" as well as an "Obsolete as of: date/time" which is 7 days after printing. The key to this stamp is that it is automatically updated with the requisite dates and times. I attempted to use a custom stamp, however, it wouldn't automatically update the dates/times.

TOPICS
Acrobat SDK and JavaScript , Windows
657
Translate
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
Community Expert ,
Jun 28, 2016 Jun 28, 2016

Use form fields for this.

Translate
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
LEGEND ,
Jun 28, 2016 Jun 28, 2016

Tis can be something that you implement with form fields and some JavaScript. There is a Document Will Print event where you can place the code. The script could be something like:

// Document Will Print scipt

// Get the current date/time

var oCurrent_Date = new Date();

// Update the date printed field

getField("DATE_PRINTED").value = "Printed: " + util.printd("yyyy-mm-dd HH:MM:ss", oCurrent_Date);

// Add 7 days to current date

oObsolete_Date = oCurrent_Date.setDate(oCurrent_Date.getDate() + 7);

// Update the Obsolete date field

getField("OBSOLETE_DATE").value = "Obsolete as of: " + util.printd("yyyy-mm-dd HH:MM:ss", oObsolete_Date);

Replace the field names in the getField statements with the actual names of the fields on your form.

Translate
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
Guest
Jul 01, 2016 Jul 01, 2016
LATEST

Thanks for the suggestion. Unfortunately, I haven't been able to figure out how to implement your suggestions. I'm not sure how to get the JavaScript into the form. Also, I'm using Acrobat Pro XI, and it has the Form Central, which I'm not certain how it works. Can you provide any further instructions on how to accomplish this?

Translate
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