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

Add date to pdf when saved

New Here ,
Apr 12, 2017 Apr 12, 2017

Copy link to clipboard

Copied

I have a pdf document hosted on my website. I want to be able to have the date added when it is printed and/or saved by an individual after they open it. If they saved the document to their own personal computer, I would like it to have the date on it when they saved it so if they open it again 3 weeks later, it still has the date when they originally saved the document.

TOPICS
Security digital signatures and esignatures

Views

1.4K

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
Community Expert ,
Apr 12, 2017 Apr 12, 2017

Copy link to clipboard

Copied

You can use the document's Will Print and Will Save events to populate a field with the current date, if that field is empty.

Votes

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 12, 2017 Apr 12, 2017

Copy link to clipboard

Copied

what does that code look like?  This?

var f = this.getField("Today");

f.value = util.printd("mmm/d/yyyy", new Date());

Votes

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
Community Expert ,
Apr 12, 2017 Apr 12, 2017

Copy link to clipboard

Copied

Almost. If you only want the field to be populated once then use this:

var f = this.getField("Today");

if (f.valueAsString=="") f.value = util.printd("mmm/d/yyyy", new Date());

Votes

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 12, 2017 Apr 12, 2017

Copy link to clipboard

Copied

is it the same for both the Will Save and Will Print events?

Votes

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 12, 2017 Apr 12, 2017

Copy link to clipboard

Copied

I would like the date to populate every time it is opened from our website.

Votes

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
Community Expert ,
Apr 12, 2017 Apr 12, 2017

Copy link to clipboard

Copied

LATEST

Yes, it's the same code.

If you want the code to run when the file is opened then you should put it as a doc-level script.

But if you do that it doesn't make sense to put it also in the Will Print and Will Save events, unless you use a different field for each one.

Votes

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