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

How to Add Bold to Java code in PDF

Community Beginner ,
Sep 09, 2024 Sep 09, 2024

Copy link to clipboard

Copied

Here is my code for the first line:

"<b>Client Services</b>+\r"+line1+line2+"Reviewers\r"+line3+line4+line5+line6+line7+

 

Here is the output:

Client Services<b>Client Services</b>+

 

How do I get it to add the bold without the <b>Client Services</b>+ after it?

 

TOPICS
Modern Acrobat , PDF , PDF forms

Views

227

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 ,
Sep 09, 2024 Sep 09, 2024

Copy link to clipboard

Copied

What is the context of your script?

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
Community Beginner ,
Sep 09, 2024 Sep 09, 2024

Copy link to clipboard

Copied

There are check boxes that the user clicks and a summary of the user's selections on the final page. The line 1, line 2, line 3, and so on are the user's selections. The Client Services and Reviewers are headings to separate the sections.

 

Client Services

Line 1

Line 2

 

Reviewers

Line 3

Line 4

Line 5

Line 6

Line 7

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
Community Expert ,
Sep 09, 2024 Sep 09, 2024

Copy link to clipboard

Copied

So it's a multi-line text field?

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
Community Beginner ,
Sep 09, 2024 Sep 09, 2024

Copy link to clipboard

Copied

Yes, exactly the code is in a multi line text field.

quote

So it's a multi-line text field?


By @PDF Automation Station

 

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
Community Expert ,
Sep 09, 2024 Sep 09, 2024

Copy link to clipboard

Copied

event.target.richText=true;
var lines1="Line 1\rLine 2\r\r";
var lines2= "Line 3\rLine 4\rLine 5\rLine 6\rLine 7";

var spans = new Array();
spans[0] = new Object();
spans[0].text="Client Services\r";
spans[0].fontWeight=900;

spans[1] = new Object();
spans[1].text = lines1;

spans[2] = new Object();
spans[2].text="Reviewers\r"
spans[2].fontWeight=900;

spans[3] = new Object();
spans[3].text = lines2;

event.target.richValue=spans;

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
Community Beginner ,
Sep 10, 2024 Sep 10, 2024

Copy link to clipboard

Copied

LATEST

Thank you!

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