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

Free Support Forum - aspose.com

Render mistake when output to html

please look below two picture:

1, the original word document

2, after output to html

“□” and “□” character in document render quite smaller than word.

i think this is a bug, please look the attachment(include the document & output html file) and check it.

lost picture: after output to html

in use 14.2,

thanks

Hi Pyntia,

Thanks for your inquiry. I have tested the scenario while using latest version of Aspose.Words for .NET 14.2.0 and have not found the shared issue. I have attached the output document with this post for your kind reference.

It would be great if you please test this scenario again at your side and let us know about your findings. If the problem still remains, please share following detail. I will investigate the issue and provide you more information.

What environment are you running on?

  • OS (Windows Version or Linux Version)
  • Architecture (32 / 64 bit)
  • .NET Framework version
  • Please supply us with the code from your application that is causing the issue

hi, Tahir

thank you for your reply

it is really a strange thing, my code is below:

string fileName = this.txtFile.Text;
ADoc.Document docx = new ADoc.Document(fileName);
FileInfo fi = new FileInfo(fileName);
string htmlFile = fileName.Substring(0, fileName.Length - fi.Extension.Length) + ".html";
docx.Save(htmlFile, GetHtmlSaveOption());
private ADoc.Saving.HtmlSaveOptions GetHtmlSaveOption()
{
    ADoc.Saving.HtmlSaveOptions options = new ADoc.Saving.HtmlSaveOptions(ADoc.SaveFormat.Html);
    options.ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.None;
    options.PrettyFormat = true;
    options.ExportFontResources = false;
    options.ExportPageSetup = true;
    options.ExportDocumentProperties = false;
    options.ExportTocPageNumbers = false;
    options.ScaleImageToShapeSize = false;
    options.ImagesFolderAlias = "/";
    options.CssStyleSheetType = ADoc.Saving.CssStyleSheetType.Embedded;
    options.ExportListLabels = ADoc.Saving.ExportListLabels.Auto;
    options.DocumentSplitCriteria = Aspose.Words.Saving.DocumentSplitCriteria.None;
    return options;
}

my develop envirement:

win8 ent 64bit with latest update

net framework 4.5

aspose 14.2

hi, Tahir

if use below code the render error will be gone. so the error scene maybe cause by the HtmlSaveOptions’s someone property.

string fileName = this.txtFile.Text;
ADoc.Document docx = new ADoc.Document(fileName);
FileInfo fi = new FileInfo(fileName);
string htmlFile = fileName.Substring(0, fileName.Length - fi.Extension.Length) + ".html";
// docx.Save(htmlFile, GetHtmlSaveOption());
ADoc.Saving.SaveOptions options = new ADoc.Saving.HtmlSaveOptions(ADoc.SaveFormat.Html);
docx.Save(htmlFile, options);

i have found just this code effact the html result.

options.CssStyleSheetType = ADoc.Saving.CssStyleSheetType.Embedded;

thanks

Hi Pyntia,

Thanks for sharing the detail.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9909. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-9909) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.