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

Free Support Forum - aspose.com

List start number is not maching with html input-output

Hi Team,

When list type is set to alpha (a, b, c) and it exceeds over 26, the output is not matching with what is seen from HTML browser.

I tested it on Aspose.Words for Java 13.5 and 14.3 and the result is the same.
I’m attaching a html, word output and standalone code to replicate the issue.

Output in browser
-------------------
ay. One
az. Two
ba. Three

Word generated using Aspose.Words
-------------------
yy. One
zz. Two
aaa. Three

Thanks,
Kumar

private static void writeListWithSetNumber(DocumentBuilder docBuilder)
{
docBuilder.writeln(“List with set different start number”);

docBuilder.getListFormat().applyNumberDefault();

docBuilder.getListFormat().setListLevelNumber(1);
docBuilder.getListFormat().getListLevel().setStartAt(51);


docBuilder.writeln(“One”);
docBuilder.writeln(“Two”);
docBuilder.write(“Three”);
}

Hi Kumar,


Thanks for your inquiry. But, when you convert this html to Word format using Microsoft Word, you’ll observe the same behavior. Please see attached Word document i.e. generated using Microsoft Word 2013. In this case, Aspose.Words mimics the behavior of Microsoft Word. This is the expected behavior. If we can help you with anything else, please feel free to ask.

Best regards,

Thanks Awais.

Hi Awais,

I understand the reason behind Word output. But, PDF output should have been same as in browser. I tested this by converting HTML to PDF from an online tool and the PDF output is similar to the HTML output. Isn’t the same expected when PDF is generated from Aspose.Words?

Thanks,
Kumar

Hi Kumar,


Thanks for the additional information. Again, when converting to PDF format using Microsoft Word 2013 or using Aspose.Words 14.3.0, the outputs in PDFs don’t match the way lists are shown in web browsers. However, I have logged your requirement in our issue tracking system as WORDSNET-10042. Our development team will further look into the details of this requirement and we will keep you updated on the status. We apologize for your inconvenience.

Best regards,

Hi Awais,

>>> when converting to PDF format using Microsoft Word 2013
or using Aspose.Words 14.3.0, the outputs in PDFs don’t match the way
lists are shown in web browsers.

Yes, even I observed that. Try generating a PDF from HTML through any online tool and you would see output same as in browser.

Thanks for raising the requirement in your issue tracking system.

Thanks,
Kumar

Hi Kumar,


Thanks for the additional information. We will inform you via this thread as soon as this issue is resolved.

Best regards,