GroupDocsGists
10/24/2017 - 1:22 PM

Examples-GroupDocs.Conversion.Examples.Java-src-main-java-com-groupdocs-conversion-examples-CommonOperations-getDocFromStreamAndFileName.java

// For complete examples and data files, please go to https://github.com/groupdocs-conversion/GroupDocs.Conversion-for-Java
// Instantiating the conversion handler
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
PdfSaveOptions saveOption = new PdfSaveOptions();
saveOption.setOutputType(OutputType.String);
 
String guid = "C:/Storage/DOCXsample.docx";
FileInputStream fileStream = new FileInputStream(guid);
 
// Convert document
String convertedDocumentPath = conversionHandler.<String>convert(fileStream, guid, saveOption);