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

How to change/update a text with Acrobat Javascript?

New Here ,
Sep 25, 2023 Sep 25, 2023

Hello,

In my PDF file, I would like to automatically update a text (not a form's field) with the current date DD-MM-YYYY after the PDF document is loaded (on Windows and Android).

Is Acrobat Javascript able to do this?
If yes, which JS commands can do it?
If not, how can I do it?
Regards,
Sam
TOPICS
Edit and convert PDFs , JavaScript , PDF
2.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
1 ACCEPTED SOLUTION
Community Expert ,
Sep 25, 2023 Sep 25, 2023

Acrobat JS can't edit static document text. You can add new text by adding a form field and then flattening it (for example), and you can remove text by redacting it, but this seems like overkill (and will also not work outside of Acrobat). Why not simply use a (read-only) text field for this?

View solution in original post

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 ,
Sep 25, 2023 Sep 25, 2023

Acrobat JS can't edit static document text. You can add new text by adding a form field and then flattening it (for example), and you can remove text by redacting it, but this seems like overkill (and will also not work outside of Acrobat). Why not simply use a (read-only) text field for this?

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 ,
Sep 26, 2023 Sep 26, 2023
LATEST

I used your last idea: a simple read-only text field, without border.

Problem solved. Thank you try67 and happy coding 🙂

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