MSG to PDF/A-1A: Transparency Issue

Hello!

I try to convert the attached MSG (with an image and some arrows on it) to PDF using Aspose.Emails and Aspose.Words:

// MSG to MTHML
MapiMessage mapiMessage = MapiMessage.fromStream(new ByteArrayInputStream(input));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
mapiMessage.save(baos, SaveOptions.getDefaultMhtml());

// MTHML to PDF
LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFormat(LoadFormat.MHTML);
Document document = new Document(new ByteArrayInputStream(baos.toByteArray()), loadOptions); 
document.save(“output.pdf”, SaveFormat.PDF);

I convert it to PDF/A-1A, which leads to an unfurtunately result.

Attached ist a Zip with input.msg and resulting pdfs.msgToPdf.zip (430.4 KB)

Kind regards

@dvtdaten The PDF/A-1 format prohibits transparency so it is expectedly removed by Aspose.Words. You could consider saving to latter PDF/A versions like PDF/A-2 or PDF/A-4.

Thank you, so we should switch to PDF/A-2.
But there is one thing, which confuses me: If I have that image in a word document, there are no transparency problems, even if I convert it to PDF/A-1A: docxToPdf.zip (826.3 KB)

@dvtdaten In the provided document arrows are represented by shapes and are exported to PDF as vector graphics. In this case transparency is not involved and arrows vector graphics simply overlaps the underlying image. In the MSG->PDF scenario arrows seems to be represented by an bitmap with transparent background which causes the issue.
If PDF/A-2 is acceptable for you then we recommend to use it because the output will be more consistent comparing to PDF/A-1 output.

@Konstantin.Kornilov thank you for the explanation

1 Like