代码如下:
License asposeLic = new License();
asposeLic.setLicense(LICENSE);
FileInputStream fstream = null;
fstream = new FileInputStream(mFilePath);
MailMessage eml = MailMessage.load(fstream);
//Save the Message to output stream in MHTML format
ByteArrayOutputStream emlStream = new ByteArrayOutputStream();
eml.save(emlStream, SaveOptions.getDefaultMhtml());
com.aspose.words.License asposeLicw = new com.aspose.words.License();
asposeLicw.setLicense(LICENSE);
//Load the stream in Word document
LoadOptions lo = new LoadOptions();
lo.setLoadFormat(LoadFormat.MHTML);
Document doc = new Document(new ByteArrayInputStream(emlStream.toByteArray()), lo);
doc.save(mTargetPath, SaveFormat.PDF);