dynamic stamps - won't pull in numbers! MAC OS

New Here ,
Apr 14, 2020 Apr 14, 2020

Copy link to clipboard

Copied

After spending an hour on hold and 1.5 hours with a chat rep, he was of NO help.

 

I have a custom sticker and if I rename the document, I want the sticker to pull in the name of the document with NUMBERS.  So if the doc is named 1, the sticker will pull in the 1.  it does not work. it is the Only field that doesn't work!  Someone Puh.leeeeeeze help me ASAP!  Thank you!

 

Here is the javascript that is "supposed" to work but doesn't. Keep in mind this stamp works on WINDOWS and Adobe says on their own website that stamping works on both platforms...

Here is the script:  

event.value = event.source.source.documentFileName;

TOPICS
Acrobat SDK and JavaScript, How to

Views

40

Likes

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
Adobe Community Professional ,
Apr 14, 2020 Apr 14, 2020

Copy link to clipboard

Copied

This code is correct. You're saying that is works correctly on Windows, but not on Mac? 

What is displayed in that field on Mac?

 

 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

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
Adobe Community Professional ,
Apr 15, 2020 Apr 15, 2020

Copy link to clipboard

Copied

This can't work, neither in Windows nor on Mac. Once you apply the stamp the fields in it are flattened. The code only executes at the moment you apply it, so if you rename the file and then re-open it the data in the stamp will not update accordingly. To do that you have to use a regular field, not one that's a part of a stamp.

Likes

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
Adobe Community Professional ,
Apr 16, 2020 Apr 16, 2020

Copy link to clipboard

Copied

LATEST

Ha ha, I didn't see that. It seems a somewhat common misconception that that stamp fields remain active after placement.. 

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Likes

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