Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Convert MSG and EML to PDF in Java
// 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);
}
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 + "eml-Message.pdf", options);
}
}
@horrito

This comment has been minimized.

Copy link

@horrito horrito commented Oct 14, 2020

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.

@atirtahirgroupdocs

This comment has been minimized.

Copy link

@atirtahirgroupdocs atirtahirgroupdocs commented Oct 16, 2020

@horrito

Please download latest version of the JAR (20.10) here and let us know if you still get such errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.