I discussed how to convert a msg/eml file to PDF using C# in this post. Let's see how to achieve this using Java.
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
PdfSaveOptions saveOption = new PdfSaveOptions();
String guid = fileName;
ConvertedDocument convertedDocumentPath = conversionHandler.<String> convert(guid, saveOption);
convertedDocumentPath.save(fileName + "." + convertedDocumentPath.getFileType());
I used GroupDocs.Conversion for Java API for the conversion process. Have a look at this thread.
Top comments (0)