|120638||Sep 29,2015 06:15 PM UTC||Oct 1,2015 08:17 AM UTC||ASP.NET Web Forms||3|
Thank you for contacting Syncfusion support.
If your requirement is to save each and every pages of the Word document as separate HTML file, then kindly keep each and every pages as separate sections in the Word document and iterate each sections from the Word document then save them as separate HTML files using the below code example.
//Opens the source document
WordDocument sourceDocument = new WordDocument(@"File location");
int i = 1;
//Iterates the sections
foreach (WSection section in sourceDocument.Sections)
//Instatiating the new WordDocument object
WordDocument htmlDocument = new WordDocument();
//Add the current section to the new Word document
//Saves the document.
htmlDocument.Save("DocIOHTML" + i.ToString() + ".html", FormatType.Html);
//Closing WordDocument instance
//Closing source document instance
Thank you for your update.
The Word document is a flow document in which contents will not be preserved page by page; instead the contents will be preserved sequentially section by section. Each section may extend to various pages based on its contents like table, text, images etc. Word viewer/editor renders the contents of the Word document page by page dynamically when opened for viewing or editing and these page wise rendered information will not be preserved in the document level as per the Word file format specification. Whereas Essential DocIO is a non UI component that provides a full-fledged document object model to manipulate the Word document contents. Hence currently it is not feasible to meet your requirement.
Please let us know in case of any other questions.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.