Free Support Forum - groupdocs.com

Convert a document and save result as stream in Java

Hi,
I use the following method to convert my document to html and get the converted stream result, "convertedDocumentStream " is the result ,But I can`t get the result stream,Can you tell me how to get or is this stream in which attribute of "convertedDocumentStream ",I use groupdocs-conversion-19.10.jar

/*
* Convert document to html and get result as stream
*/
public static void convertToHtmlAsStream(String fileName) {
//ExStart:convertToHtmlAsStream
// Instantiating the conversion handler
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
ConvertedDocument convertedDocumentStream = conversionHandler. convert(fileName,new HtmlSaveOptions());
//ExEnd:convertToHtmlAsStream
}

Any suggestions would be greatly appreciated !!!

@YvanZhang,

Yes, your result stream is saved in convertedDocumentStream. Please have a look at this article.

@atirtahir3

stream.png (8.3 KB)
Is this “intenalBuffer” the result stream after being converted to html?I want to get the converted stream instead of the html file to the front-end

@YvanZhang,

We are investigating this scenario. Your investigation ticket ID is CONVERSIONJAVA-899. You’ll be notified about the outcomes.

@atirtahir3
Is there any good news, I am waiting for your reply!!

1 Like

@YvanZhang,

This ticket is still under investigation. We’ll notify you as there is any update.