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

Working with Acrobat Pro dc. I want to add the words "Printed on:" before date.

Explorer ,
Aug 22, 2017 Aug 22, 2017

I have pdf document that has a javascript set to allow date to appear when document is printed but hidden when viewing.

ASK:  I want to have the words PRINTED ON: appear before the date.

I created a text field and named it TODAY.  Selected HIDDEN BUT PRINTABLE in properties.

Then chose:  Javascript, document actions,  Select document will print, edit, them the following script.

this.getField("TODAY").value = util.printd("mm/dd/yyyy", new Date());

[Email address removed by Moderator]

TOPICS
Acrobat SDK and JavaScript , Windows
1.1K
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 ,
Aug 22, 2017 Aug 22, 2017

Add

"PRINTED ON: " +

before util.

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
Explorer ,
Aug 22, 2017 Aug 22, 2017

Hello,

This is script I am using and it isn’t working for me. Am I missing something?

this.getField("TODAY").value = "PRINTED ON:" + util.printd("mm/dd/yyyy", new Date());

Thanks!

Susan Gionet I Digital Publishing I Graphic Design I 506.648.2215

Irving Paper

435 Bayside Drive

Saint John, NB

E2L 4K9

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 ,
Aug 22, 2017 Aug 22, 2017

What can you see on the printout.

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
Explorer ,
Aug 22, 2017 Aug 22, 2017

Only the date

Susan Gionet I Digital Publishing I Graphic Design I 506.648.2215

Irving Paper

435 Bayside Drive

Saint John, NB

E2L 4K9

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 ,
Aug 22, 2017 Aug 22, 2017

Looks like that you use the old script.

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
Explorer ,
Aug 23, 2017 Aug 23, 2017

Good morning,

What should the script be? I’m not a user of javascript so not exactly sure what is wrong with my script.

Thanks,

Susan Gionet I Digital Publishing I Graphic Design I 506.648.2215

Irving Paper

435 Bayside Drive

Saint John, NB

E2L 4K9

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 ,
Aug 23, 2017 Aug 23, 2017

Use this:

this.getField("TODAY").value = "PRINTED ON: " + util.printd("mm/dd/yyyy", new Date());

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
Explorer ,
Aug 23, 2017 Aug 23, 2017

No, still not working. Only the date appears without the text. Could it have something to do with the text field named TODAY?

Susan Gionet I Digital Publishing I Graphic Design I 506.648.2215

Irving Paper

435 Bayside Drive

Saint John, NB

E2L 4K9

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 ,
Aug 23, 2017 Aug 23, 2017

No, that's not an issue.

Can you share the file in question (via Dropbox, Google Drive, Adobe Cloud, etc.)? Post the link to it here.

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
Explorer ,
Aug 23, 2017 Aug 23, 2017

Here is the file that contains the text field and javascript on lower right footer.

Susan Gionet I Digital Publishing I Graphic Design I 506.648.2215

Irving Paper

435 Bayside Drive

Saint John, NB

E2L 4K9

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 ,
Aug 23, 2017 Aug 23, 2017

You can't attach files here directly. Share it using a file-sharing website, like I described.

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
Explorer ,
Aug 23, 2017 Aug 23, 2017

Unfortunately I am unable to use dropbox, google drive, etc. due to company security restrictions. I can only email.

Susan Gionet I Digital Publishing I Graphic Design I 506.648.2215

Irving Paper

435 Bayside Drive

Saint John, NB

E2L 4K9

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 ,
Aug 23, 2017 Aug 23, 2017

You can send it to me to try6767 at gmail.com and I'll check out what's going wrong.

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 ,
Aug 23, 2017 Aug 23, 2017
LATEST

Update for those interested: The script worked fine. The issue was that the fields were too small to show the full text.

Resizing them (or changing the font size) solved it.

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 ,
Aug 23, 2017 Aug 23, 2017

What script do you use at "document will print" ?

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
Explorer ,
Aug 23, 2017 Aug 23, 2017

this.getField("TODAY").value = "PRINTED ON: " + util.printd("mm/dd/yyyy", new Date());

Susan Gionet I Digital Publishing I Graphic Design I 506.648.2215

Irving Paper

435 Bayside Drive

Saint John, NB

E2L 4K9

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