Hi
I am converting .eml file to pdfA. but once it is converted logos or inline images are displaying as ‘X’ mark. i am using aspose 20.7 for email and pdf. Could you please help me getting inline logos. eml once converted to pdf.
Pls find the code snippet :
ByteArrayOutputStream stream = new ByteArrayOutputStream();
PdfSaveOptions options = new PdfSaveOptions();
options.setCompliance(PdfCompliance.PDF_A_1_B);
try {
MailMessage eml = MailMessage.load(docStream);
// Save the Message to output stream in MHTML format
ByteArrayOutputStream emlStream = new ByteArrayOutputStream();
//eml = setOriginalMailAddressToPdf(eml, guid);
eml.save(emlStream, SaveOptions.getDefaultMhtml());
// Load the stream in Word document
LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFormat(LoadFormat.MHTML);
Document doc = new Document(new ByteArrayInputStream(emlStream.toByteArray()), loadOptions);
// or Save to stream
doc.save(stream, options);
Thanks in Advance.