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

How can I automatically generate a bookmark with the value of a given text field value?

New Here ,
Jan 19, 2021 Jan 19, 2021

Copy link to clipboard

Copied

Hi. I am trying to automate a document (medical history) where I have a text field ("Combined allergies" ) where its value (text) is derived from several other fields (individual alllergies). I need this value to be automatically copied either to a new bookmark, or to a previous, fixed, bookmark, and if possible in red fonts (so as to alert me of patient's allergies). Is this possible? Thanks.

TOPICS
Create PDFs , Edit and convert PDFs , How to , JavaScript , PDF forms

Views

237

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
Community Expert ,
Jan 20, 2021 Jan 20, 2021

Copy link to clipboard

Copied

Depends. Will you be using the file only in Adobe Acrobat? If so, then yes (although you'll need to provide some more information about whether you want it to create a new bookmark or edit an existing one, and which one). It will not work if used in the free Reader, though.

 

Here's an example code that sets the text of the first bookmark in the file to the field's value each time it changes, to be used at the end of the field's custom calculation script:

 

this.bookmarkRoot.children[0].name = event.value;

 

It assumes the bookmark already exists. The red text color can be applied manually.

Votes

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

Copy link to clipboard

Copied

LATEST

Thank you!!! That worked just great.

Best regards,

[Private info removed by moderator]

Votes

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