Last active
May 28, 2021 05:09
-
-
Save GroupDocsGists/26a955193719a219fd8db89eb6de7516 to your computer and use it in GitHub Desktop.
Convert MSG and EML to PDF in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Convert EML message to PDF | |
public void convertEmltoPDF(String filePath) | |
{ | |
Converter converter = new Converter(filePath + "emailMessage.eml"); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
converter.convert(filePath + "eml-Message.pdf", options); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.groupdocs.conversion.Converter; | |
import com.groupdocs.conversion.options.convert.PdfConvertOptions; | |
public class EmailMessagesConverter | |
{ | |
// Convert MSG message to PDF | |
public void convertMsgtoPDF(String filePath) | |
{ | |
Converter converter = new Converter(filePath + "emailMessage.msg"); | |
PdfConvertOptions options = new PdfConvertOptions(); | |
converter.convert(filePath + "msg-Message.pdf", options); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I downloaded from the link "GroupDocs.Conversion for Java 1.0.0" the jar file "GroupDocs.Conversion.jar".
There is not a package "com.groupdocs.conversion".
There is not a package "com.groupdocs.conversion.options.convert".
Please, could someone help me? I just need this java code but it doesn't work.