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

Free Support Forum - aspose.com

Always throw exception when output to html on some document

hi,
my code is very simple, save a document to html, like below

ADoc.Document = new ADoc.Document(file);
this.docx.Save(stream, options);

option setting:

ADoc.Saving.HtmlSaveOptions options = new ADoc.Saving.HtmlSaveOptions(ADoc.SaveFormat.Html);
options.ExportHeadersFootersMode = Aspose.Words.Saving.ExportHeadersFootersMode.None;
options.ExportFontResources = false;
options.ExportPageSetup = true;
options.ExportDocumentProperties = false;
options.ExportTocPageNumbers = false;
options.ScaleImageToShapeSize = false;
options.ImagesFolderAlias = "/";
options.DocumentSplitCriteria = Aspose.Words.Saving.DocumentSplitCriteria.None;

these code working on some document, will always throw "null reference" exception.


test document
Hi Pyntia,

Thanks for your inquiry.

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-9842. 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.

hi, Tahir


thank you for quickly response.

is possible can post some temporary version while bug fixed?
Hi Pyntia,

Thanks for your inquiry. Unfortunately, there is no workaround available for this issue. I would like to share with you that issues are addressed and resolved based on first come first serve basis. We will update you via this forum thread once there is any update available on your issue.

Thank you for your patience and understanding.


i found if save to a physical html file, will be ok, if save to a stream, it should be possible throw System.NullReferenceException even a very very simple document.


attach document just have only one picture, will throw exception.
Hi Pyntia,

Thanks for your inquiry. In your case, I suggest you please use the HtmlSaveOptions.ExportImagesAsBase64 property with value true. This property specifies whether images are saved in Base64 format to HTML, MHTML or EPUB. Default is false.

Please let us know if you have any more queries.


Document doc = new Document(MyDir + "dafsda.docx");

HtmlSaveOptions options = new HtmlSaveOptions();

options.ExportImagesAsBase64 = true;

options.SaveFormat = SaveFormat.Html;

MemoryStream stream = new MemoryStream();

doc.Save(stream, options);


hi, Tahir


thank you for your reply

do you have testing this code?
in my side, this code will be throw exception always.


please look the attach picture for detail.


my develop envirement:
vs2013 sp1,
win8 ent 64 with latest update,
aspose.words 14.2

hi, Tahir


i am sorry for my careless.

there has an error in my code.

thanks.
Hi Pyntia,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.

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


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