Free Support Forum -

Convert and save results in input stream using Java

Hello guys,

Does anyone knows how to convert to List of GroupDocsInputStream for the new version 17.12-Java?

Old version
List gis = m_oHandler.<List> convert(fileName,

Current version
ConvertedDocument convertedDocument = conversionHandler.convert(“filename”, saveOption);

Thanks in advance.



Thank you for taking interest in GroupDocs.Conversion for Java and posting your concerns. In latest version of the API, converted results are only handled by ConvertedDocument class as follows:

ConvertedDocument convertedDocumentStream = conversionHandler
.<List<GroupDocsInputStream>> convert(fileName, new ImageSaveOptions());

However, we are further investigating this scenario at our end. Your investigation ticket ID is CONVERSIONJAVA-516. As we have any update, we shall inform you.

Thanks for the reply. But how to get the List of GroupDocsInputStream from the object convertedDocumentStream ? Because convertedDocumentStream got few methods only like save, also casting to a list doesn’t work. Thank you.


We are investigating this scenario at our end. You shall be notified about the outcomes.

Thanks a lot.


You are welcome.


Please follow the code given below. Hope it will help you.

// Instantiating the conversion handler
ConversionHandler handler = new ConversionHandler(config);

ConvertedDocument result = handler.convert(sourceFile, new ImageSaveOptions());

ArrayList<InputStream> streams = new ArrayList<>();
for (int i = 1; i <= result.getPageCount(); i++) {
    GroupDocsOutputStream stream = new GroupDocsOutputStream();, i);

// Do anything with converted streams
for (InputStream stream : (Iterable<InputStream>) streams) {

thanks a lot.

1 Like


You are welcome.