Display ordered lists in PDF

Hi,

I have following html code which I am inserting into PDF file.

  • List 1
  • list 2

It should look up like this in PDF

testing listes:

1. list1

2. list2

How can we achieve proper indentation in the PDF file.

Thanks

Mamatha

Hi Mamatha,


Thanks for contacting support.

I have tested the scenario using following code snippet and the output seems identical to your requirement. Please take a look over the attached output which is generated over my end.

[Java]

String str =

  1. List
    1
  2. List 2
”;<o:p></o:p>

//Instantiate Pdf pbject by calling its empty constructor

Pdf pdf1 = new Pdf();

//Create a new section in the Pdf object

Section sec1 = pdf1.getSections().add();

//Create a new text paragraph and pass the text to its constructor as argument

Text text1 = new Text(str);

text1.setIsHtmlTagSupported(true);

sec1.getParagraphs().add(text1);

pdf1.save("d:/pdftest/Ordered_List_test_PDF.pdf");

Hi,

It should be displayed like this. Like in word. period after numbers. Indent infront of list items.

Available options:

1. Apples

2. oranges

How can this be achieved?

Thanks for looking into it.

Mamatha

Hi Mamatha,


Thanks for sharing details.

I have tested the scenario and I am able to reproduce the same problem. For the
sake of correction, I have logged it in our issue tracking system as
PDFJAVA-33172. We
will investigate this issue in details and will keep you updated on the status
of a correction.

We
apologize for your inconvenience.