// For complete examples and data files, please go to https://github.com/groupdocs-conversion/GroupDocs.Conversion-for-Java
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
// Save options
SaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setOutputType(OutputType.String);
String result = conversionHandler.<String> convert(sourceFileName, saveOptions);