Issue when generating a document with more than 2046 bullets using Aspose Words

Hi Team,

We have identified a scenario where in if I try generating a document containing more than 2046 number of bullets using the latest Aspose version (17.7.1). The bullets disappear after the 2046th one.

But If I try manually building such document it goes through just fine.
Can you please investigate as to why Aspose fails to generate bullets any further ?

Please find code to replicate the issue and generated outputs with the same and manually created documents.

Regards
Tejashree

Issue_LargeNumberOfBullets.zip (65.9 KB)

@tejashreegupta

Thanks for your inquiry. Please note it is not a bug but the count of list definitions per document is limited. MS Word itself has limited count of lists and stop displaying it after 2046 limit is exceeded.
It seems that MS Word has limited slots for list definitions and stops adding new lists after list count reaches 2046 items.

However to avoid this situation you can use one list to format for all list items as shown in following code example. Hope this helps you.

Document doc = new Document();
DocumentBuilder docBuilder = new DocumentBuilder(doc);
com.aspose.words.List list = doc.getLists().add(ListTemplate.BULLET_DEFAULT);
for(int i=1; i <= 2050 ; i++)
{
	docBuilder.write("\nTest Bullet "+i);
	docBuilder.getListFormat().setList(list);
}

doc.save("bullets_docx.docx");
doc.save("bullets_doc.doc");