Converting Document to HTML stream sometimes throws EXception

Hi Hafeez,
One more issue we are facing from this week as while calling “doc.save(htmlStream, htmlSaveOptions);” following exceptions occuring … its not regularily happening, sometime we are getting this exception.
com.aspose.words.zzZ2J.zzYPH(Unknown Source)
com.aspose.words.zzZMK.zzZ(Unknown Source)
com.aspose.words.zz3R.zzZ(Unknown Source)
com.aspose.words.zzZMG.zzZ(Unknown Source)
com.aspose.words.zzZMG.zzZ(Unknown Source)
com.aspose.words.zzZMG.zzZ(Unknown Source)
com.aspose.words.zzZHD.zz6(Unknown Source)
com.aspose.words.zzZHC.zz4(Unknown Source)
com.aspose.words.zzZHH.visitShapeStart(Unknown Source)
com.aspose.words.Shape.zzZ(Unknown Source)
com.aspose.words.CompositeNode.acceptCore(Unknown Source)
com.aspose.words.Shape.accept(Unknown Source)
com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
com.aspose.words.CompositeNode.acceptCore(Unknown Source)
com.aspose.words.Paragraph.accept(Unknown Source)
com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
com.aspose.words.CompositeNode.acceptCore(Unknown Source)
com.aspose.words.HeaderFooter.accept(Unknown Source)
com.aspose.words.zzZVY.zzYO(Unknown Source)
com.aspose.words.zzZVY.zzY(Unknown Source)
com.aspose.words.zzZVY.zzW(Unknown Source)
com.aspose.words.zzZVY.zzY(Unknown Source)
com.aspose.words.zzZVY.zzZoH(Unknown Source)
com.aspose.words.zzZVY.zzZEa(Unknown Source)
com.aspose.words.zzZVY.zzZp5(Unknown Source)
com.aspose.words.zzZR1.zzZ(Unknown Source)
com.aspose.words.zzZF8.zzZ(Unknown Source)
com.aspose.words.Document.zzZ(Unknown Source)
com.aspose.words.Document.zzZ(Unknown Source)
com.aspose.words.Document.zzZ(Unknown Source)
com.aspose.words.Document.save(Unknown Source)

Hi Is there any update for this issue, randomly we getting the following exceptions while saving the docs.
com.aspose.words.zzZ2J.zzYPH(Unknown Source)
com.aspose.words.zzZMK.zzZ(Unknown Source)
com.aspose.words.zz3R.zzZ(Unknown Source)
com.aspose.words.zzZMG.zzZ(Unknown Source)
com.aspose.words.zzZMG.zzZ(Unknown Source)
com.aspose.words.zzZMG.zzZ(Unknown Source)
com.aspose.words.zzZHD.zz6(Unknown Source)
com.aspose.words.zzZHC.zz4(Unknown Source)
com.aspose.words.zzZHH.visitShapeStart(Unknown Source)
com.aspose.words.Shape.zzZ(Unknown Source)
com.aspose.words.CompositeNode.acceptCore(Unknown Source)
com.aspose.words.Shape.accept(Unknown Source)
com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
com.aspose.words.CompositeNode.acceptCore(Unknown Source)
com.aspose.words.Paragraph.accept(Unknown Source)
com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
com.aspose.words.CompositeNode.acceptCore(Unknown Source)
com.aspose.words.HeaderFooter.accept(Unknown Source)
com.aspose.words.zzZVY.zzYO(Unknown Source)
com.aspose.words.zzZVY.zzY(Unknown Source)
com.aspose.words.zzZVY.zzW(Unknown Source)
com.aspose.words.zzZVY.zzY(Unknown Source)
com.aspose.words.zzZVY.zzZoH(Unknown Source)
com.aspose.words.zzZVY.zzZEa(Unknown Source)
com.aspose.words.zzZVY.zzZp5(Unknown Source)
com.aspose.words.zzZR1.zzZ(Unknown Source)
com.aspose.words.zzZF8.zzZ(Unknown Source)
com.aspose.words.Document.zzZ(Unknown Source)
com.aspose.words.Document.zzZ(Unknown Source)
com.aspose.words.Document.zzZ(Unknown Source)
com.aspose.words.Document.save(Unknown Source)

@VOCONSENT,

To ensure a timely and accurate response, please ZIP and attach the following resources here for testing:

  • Your simplified input Word document you are getting this problem with
  • Please also create a standalone simple Java application (source code without compilation errors) that helps us to reproduce your current problem on our end and attach it here for testing. Please do not include Aspose.Words JAR files in it to reduce the file size.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

Hi Hafeez,
Thanks for the reply.
Pfa files.zip. and find readme.txt fileFiles.zip (87.3 KB)

@VOCONSENT,

Please try the following workaround and see if that resolves the issue on your end:

Document doc = new Document("D:\\temp\\in.docx");

HtmlSaveOptions htmlSaveOptions = new HtmlSaveOptions(SaveFormat.HTML);
htmlSaveOptions.setExportImagesAsBase64(true);

ByteArrayOutputStream htmlStream = new ByteArrayOutputStream();
doc.save(htmlStream, htmlSaveOptions);

Thanks Hafeez. you can close the ticket. If i face the issue i will get back to you. as of now not able to replicate the issue. its working as intended by adding the above setExportImagesAsBase64(true).

@VOCONSENT,

Sure, in case you may have further inquiries or need any help in future, please let us know.