Hello,
if I convert a rtf-mail via aspose.email into mhtml, the attached images are also shown inside mhtml (and lateron in pdf). Is there a possibility to NOT include them into pdf?
File: test.zip (3.1 MB)
Chrysanthemum.jpg and Desert.jpg are Attachments. This one should NOT be shown in PDF.
Code:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ByteArrayOutputStream baos2 = new ByteArrayOutputStream();
ByteArrayInputStream bais = null;
MhtSaveOptions mhtmlSaveOptions = SaveOptions.getDefaultMhtml();
mhtmlSaveOptions.setMhtFormatOptions(0);
mapiMessage.save(baos, mhtmlSaveOptions);
bais = new ByteArrayInputStream(baos.toByteArray());
Document doc = new Document(bais, getDocLoadOptions());
PdfSaveOptions options = new PdfSaveOptions();
options.setCompliance(PdfCompliance.PDF_A_1_B);
options.setOptimizeOutput(true);
doc.save(baos2, options);
return baos2.toByteArray();
Thanks
Josef