We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PDF(java) HTML Unorder list - Question

Hi there,

I am unable to generate PDF that has un-order list as the HTML content.

Example :-

  • one
  • two

But following works fine

  1. one
  2. two

Please let me know if I am missing anything. For this I am using pdf 2.5.0 for java.

Appreciate your timely response.


This message was posted using Aspose.Live 2 Forum

Hi,

I have tested the scenario using the following code snippet and I am unable to notice any problem. I have tested using Aspose.Pdf for Java 2.5.0 and the resultant PDF that I have generated is in attachment. Please take a look.

[Java]

Pdf pdf = new Pdf();
Section section = pdf.getSections().add();

Text HTMLText1 = new Text("

  • one
  • two
");
HTMLText1.setIsHtmlTagSupported(true);
HTMLText1.getSegments().getSegment(0).getTextInfo().setFontName("Arial");
section.getParagraphs().add(HTMLText1);

Text HTMLText2 = new Text("

  1. one
  2. two
");
HTMLText2.setIsHtmlTagSupported(true);
HTMLText2.getSegments().getSegment(0).getTextInfo().setFontName("Arial");
section.getParagraphs().add(HTMLText2);

String outFilePDF = "d:/pdftest/SamplePDF_HTMLTest.pdf";
pdf.save(outFilePDF);

Can you please share some more details regarding your working / application environment. We apologize for your inconvenience.

Hello,
My apologies, yes it works fine. -Thanks,