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

Dynamic Stamp - text field

New Here ,
Apr 04, 2018 Apr 04, 2018

I am in the process of creating a dynamic stamp with a text field that has a custom calculation script to use the document name.

This is the script that I found and am using:

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

It pulls the document name in fine but it displays it as 1234.pdf, is there a different script or more that I need to add to the current script that would pull in the document name but leave off the .pdf?

TOPICS
Acrobat SDK and JavaScript , Windows
998
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

correct answers 1 Correct answer

Community Expert , Apr 04, 2018 Apr 04, 2018

It's a simple string manipulation:

event.value = event.source.source.documentFileName.replace(".pdf", "");

Translate
Community Expert ,
Apr 04, 2018 Apr 04, 2018

It's a simple string manipulation:

event.value = event.source.source.documentFileName.replace(".pdf", "");

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
New Here ,
Apr 04, 2018 Apr 04, 2018

That worked beautifully!! Thank you for your quick response.

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
New Here ,
May 20, 2021 May 20, 2021
LATEST

u

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