GroupDocsGists
10/24/2017 - 1:22 PM

getSourceDocFromRelativePath.java

// For complete examples and data files, please go to https://github.com/groupdocs-conversion/GroupDocs.Conversion-for-Java
// Instantiating the conversion handler, you can define relative file
// path in utilities class
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
HtmlSaveOptions saveOption = new HtmlSaveOptions();
saveOption.setOutputType(OutputType.String);

// Set relative path. So that full path will be C:/Storage/DOCXsample.docx
String guid = "DOCXsample.docx";

String convertedDocumentPath = conversionHandler.<String> convert(guid, saveOption);
System.out.print("Converted file path is: " + convertedDocumentPath);