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

Free Support Forum - aspose.com

List numbering issue in document concatenation

Hi Tilal,

Thanks for the resolving the above issue.

After resolving this issue , we ran into another one. After splitting documents , our use case is to append the splitted documents and convert them to html and give the html to user. But the converted html is showing wrong indentation . The page 4 is showing indentation 1 instead of 5. Attaching the splitted documents. Please help.

1506321099018.zip (29.9 KB)

//code used for appending
for (Document sourceDocument : documentsToMerge) {
startdocument.appendDocument(sourceDocument, ImportFormatMode.KEEP_DIFFERENT_STYLES);

//code used for converting into html
HtmlFixedSaveOptions saveOptions = new HtmlFixedSaveOptions();
return saveOptions;


Thanks for your inquiry. Please get List from any paragraphs of destination document and apply to source document paragraphs as following. It will resolve the list number issue.

com.aspose.words.List list = null;

for (Paragraph para : (Iterable<Paragraph>) dstDoc.getChildNodes(
		NodeType.PARAGRAPH, true)) {
	if (para.isListItem()
			&& para.getListFormat().getListLevelNumber() == 0) {
		list = para.getListFormat().getList();
com.aspose.words.Document srcDoc = new com.aspose.words.Document(
// document1.FirstSection.PageSetup.SectionStart =
// SectionStart.Continuous;

com.aspose.words.List newList = srcDoc.getLists().addCopy(list);
for (Paragraph para : (Iterable<Paragraph>) srcDoc.getChildNodes(
		NodeType.PARAGRAPH, true)) {
	if (para.isListItem()
			&& para.getListFormat().getListLevelNumber() == 0) {
dstDoc.appendDocument(srcDoc, ImportFormatMode.USE_DESTINATION_STYLES);