Free Support Forum - groupdocs.com

Issue regarding groupdocs conversion


#1

Hi Team,

I want to convert input stream to pdf file and also wants to download that converted pdf file in java. Please help to provide code spinet so that we can use it in my project.

Many thanks


#2

@saras1234,

Below is the sample code:

PdfSaveOptions saveOption = new PdfSaveOptions();
String guid = "D:/conversion/Data/SourceFiles/demo.docx";
FileInputStream fileStream = new FileInputStream(guid);
ConvertedDocument convertedDocumentPath = conversionHandler.<String> convert(fileStream,saveOption);

Please note that API doesn’t provide any such feature. It just generates the output file in a specified folder. However, you can implement your own logic to download file.