2 Replies Latest reply on Dec 17, 2015 6:20 PM by KenSingh

    How can I make part of the Text as Bold in a Text field using Adobe Javascript for a Pdf document?

    KenSingh

      I want to get part of the below text Bold like: aProduct.getItemAt(aSelection,false) + "\n\nQuote\n\n You have Selected the <b>Second<\b> Option";

       

      Output: You have Selected the Second Option

       

      But I can't use <b>....not sure how to do this. Can you please help me with any solution for below.

       

      (function () {

          // Do nothing if not committed
          if (event.willCommit) return;

          // Set up an array to hold the individual paragraphs of text
          var aProduct = this.getField("Motor_Combo_Box");
          var aSelection = aProduct.currentValueIndices;
           switch(aSelection)
          {
              case 0:
                      this.getField("Motor_paragraph_text").value = aProduct.getItemAt(aSelection,false) + "\n\nQuote\n\n You have Selected the <b>First</b> Option"
                      break; 

              case 1:
                      this.getField("Motor_paragraph_text").value = aProduct.getItemAt(aSelection,false) + "\n\nQuote\n\n You have Selected the <b>Second</b> Option";
                      break;

              case 2:
                     this.getField("Motor_paragraph_text").value = aProduct.getItemAt(aSelection,false) + "\n\nQuote\n\n You have Selected the <b>Third</b> Option";
                      break;
          }

      })();