Skip to main content
New Participant
April 14, 2020
Question

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

  • April 14, 2020
  • 2 replies
  • 555 views

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;

This topic has been closed for replies.

2 replies

try67
Community Expert
April 15, 2020

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.

Thom Parker
Community Expert
April 16, 2020

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 PDFScriptingUse the Acrobat JavaScript Reference early and often
Thom Parker
Community Expert
April 15, 2020

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 PDFScriptingUse the Acrobat JavaScript Reference early and often