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

Free Support Forum - aspose.com

Convert Word to HTML numbering within margin-left


Is there any option to achieve a word conversion to html without adding a margin-left & padding-left to the tag html <li> resulted from a numbering conversion ?
The code I’m using to proceed with that conversion is as follows :

	AsposeWord aWord = new AsposeWord(templateName);
						SyncfusionTemplateCompatibility = true
					aWord.OfficeVersion = aWord.OfficeVersionIs2007 ? AsposeOfficeVersion.Office2007AndGreater : AsposeOfficeVersion.CompatibilityVersion;

				//if we didn't find the CSS file, shoud be because the import was previous to the patch so we create it
				MemoryStream outStream = new MemoryStream();
				HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.Html)
					ExportHeadersFootersMode = ExportHeadersFootersMode.None,
					ImageSavingCallback = new HandleImageSaving(),
					ExportImagesAsBase64 = true,
					// Extract Word styles as CSS class. generate class for each BuiltIn style used and for each custom class (used or not)
					CssStyleSheetType = CssStyleSheetType.Embedded,
					ExportListLabels = ExportListLabels.ByHtmlTags

				aWord.WordDocument.Save(outStream, saveOptions);

				outStream.Position = 0;
				string output = string.Empty;
				using (StreamReader reader = new StreamReader(outStream))
					output = reader.ReadToEnd();


As an attachment you can find the docx input and the html output.
I’m using Aspose Words: for .net.
This is also reproducible via the online conversion : https://products.aspose.app/words/fr/conversion/word-to-html

NumberingFromWordToHtml.zip (771 Bytes)



Could you please ZIP and attach the input Word document and expected output HTML here for our reference? We will then provide you code example according to your requirement.