Convert to html and pagination

I need to convert word to the html, and write it to response.outputStream.
I wanna convert one page of the word document once.

I knew the HtmlFixedOptions can implement the html pagination, but looks the Css works wrong in IE6, 7, 8, everything messed up.

Can I get the html pagination by other choice? I need this to work in IE6,7 or 8.

Also, I wanna get the word tracking change highlight, any suggestion?

Thanks

Hi Jason,

Thanks for your inquiry. Well, HTML based formats are not paginated that is why when you view the Word document in the web layout, it shows as one continuous document. Secondly, you can use HtmlFixedSaveOptions.PageIndex and HtmlFixedSaveOptions.PageCount properties to export a single page to HTML format as follows:

Document doc = new Document(@"C:\Temp\in.doc");
HtmlFixedSaveOptions saveOptions = new HtmlFixedSaveOptions();
saveOptions.PageIndex = 0;
saveOptions.PageCount = 1;
doc.Save(@"C:\temp\out.html",

saveOptions);

Moreover, please attach your input Word document and output HTML file showing the undesired behaviour here for testing? I will investigate the issue on my side and provide you more information.

Best regards,

Hi Awais,

Appreciate your response to my question.
I used the HtmlFixedSaveOptions to convert my Word. The sample code as follows:

Document doc = new Document("D:\jason\testDemo.docx");
HtmlFixedSaveOptions fixedOption = new HtmlFixedSaveOptions();
fixedOption.setPageIndex(0);
fixedOption.setPageCount(1);
fixedOption.setPrettyFormat(true);
fixedOption.setExportEmbeddedCss(true);
fixedOption.setExportEmbeddedFonts(true);
fixedOption.setPrettyFormat(true);
fixedOption.setUseHighQualityRendering(true);
fixedOption.setSaveFormat(SaveFormat.HTML_FIXED);
doc.save("D:\jason\testDemo.html", fixedOption);

After I opened the testDemo.html in IE8, the content messed up, and you can get this from the attachment testDemo.JPG which is the screenshot of the testDemo.html. Note that in FireFox and Google Chrome of my local computer, the format of the html looks good.
It looks that IE 6, 7 or 8 don’t support CSS3. But maybe our production will be used in IE6, 7 or 8 for a long time, we must consider this case.

Attachment is sample Word doc and the screenshot of the generated HTML.

Please test the detail and give me some support.

Best Wishes

Jason

Hi Jason,

Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-8337. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hi Jason,
Thank you for your interest in Aspose.Words. You are absolutely right, the problem occurs because IE6, 7 and 8 do not support CSS3:
https://www.w3schools.com/cssref/css3_browsersupport.php
In fixed page HTML we extensively use CSS3 features, especially transformation matrixes.
As a workaround, I would suggest you to use some fallback for viewing documents in I IE6, 7 and 8. For example you can use Simple image, SVG or SWF as fallback. I think in your case SWF fallback would be preferred because I IE6, 7 and 8 have limited support of SVG. Let me know if using SWF is acceptable option for you.
Best regards,

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan