Hi,
I am trying to convert PDF input stream to HTML and then saving it to ByteArrayOutputStream.
And I am getting following error for above conversion.
Save a document to a html stream is not supported. Please use method save to the file.
My code is as follows,
final ByteArrayOutputStream dstStream = new ByteArrayOutputStream();
// here ‘docInputStream’ is the InputStream of PDF document.
com.aspose.pdf.Document pdfDocument = new com.aspose.pdf.Document(docInputStream);
pdfDocument.save(dstStream, new HtmlSaveOptions());
final ByteArrayInputStream srcStream = new ByteArrayInputStream(dstStream.toString(“utf-8”).getBytes(Charset.forName(“utf-8”)));
return srcStream;
Is saving document to HTML stream not supported by Aspose ? If yes, is there any workaround to deal with this ?