// 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);
FileInputStream fileStream = new FileInputStream("C:/Storage/DOCXsample.docx");
// Convert document
String convertedDocumentPath = conversionHandler.<String>convert(fileStream,"C:/Storage/DOCXsample.docx", saveOption);