1

I am using a PDF template created using open office draw to write the contents into the PDF.

It designed using multiple textboxes based on the format we require.

With the help of Acrofields we will set the values to each text boxes.

I am using a single text area to print the label and its content. I need my label to appear in bold and contents to be in non-bold.

PdfStamper stamper1;

AcroFields form = stamper1.getAcroFields();

String text = "Product ID: "+productName+"\n"+"\n"+"Description: "+productDesc.trim;

form.setField("Section1-Line1", text);

This Section1-Line1 is the text area name, so the value of text is now set to the text area.

My requirement is to make the labels in bold(i.e Product ID: and Description:)

Since it is displayed in single text area all the contents are printed with the normal font.

What we thought of doing is adding HTML content to the label to make it bold and we could render the HTML in the template.

String text = " Product ID: "+productName+"\n"+"\n"+"Description: "+productDesc.trim+"";

form.setField("Section1-Line1", text);

My problem is that HTML content is not rendered in the template.

Please anyone help me out in bringing the labels in bold.

kalpana
  • 11
  • 2

0 Answers0