Lotus Notes email to PDF conversion does not contain inline/embedded images

The converted PDF only contains placeholders for the images. The images are only listed in the external attachment list.
See example email: lotus-notes.zip (118.2 KB)

Outlook and other EML converted files are ok, the problem affects only Lotus Notes E-Mails

@depi

Please create a sample Java application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing. We will investigate the issue and provide you more information on it.

Here a simple test program: Simple.zip (1.0 KB)

public static void main( String[] args ) throws Exception {
    
    File lotusNotesEmail = new File ( "C:\\Ceyoniq\\temp\\277DB3699C46DE8BC12588D3002B3825.eml" );
    File output = new File ( "C:\\Ceyoniq\\temp\\converted-email.pdf" );
    
    MailMessage eml = null;
    
    try ( InputStream fis = new FileInputStream( lotusNotesEmail ) ) {

        eml = MailMessage.load( fis );
        
        File mhtml = new File ("C:\\Ceyoniq\\temp\\temp.mhtml");
        
        MhtSaveOptions mso = SaveOptions.getDefaultMhtml();
        mso.setMhtFormatOptions( DEFAULT_MHT_FORMAT_OPTIONS );

        eml.save( mhtml.getAbsolutePath(), mso );

        HtmlLoadOptions loadOptions = new HtmlLoadOptions ();
        loadOptions.setLoadFormat ( LoadFormat.MHTML );
        
        Document doc = new Document( mhtml.getAbsolutePath(), loadOptions );

        doc.save( output.getAbsolutePath(), new PdfSaveOptions() );

    } finally {
        if ( eml != null ) { 
            eml.close();                
        }
    }

    System.out.println( "done." );
}

@depi

We have logged this problem in our issue tracking system as EMAILJAVA-35120. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@depi

We have closed the ticket EMAILJAVA-35120 as ‘Not a Bug’. The you need to check the ContentDisposition.Inline Attachment option for Lotus notes emails as shown below to get the desired output.

eml = MailMessage.load(fis);
if (isLotusNotes) {
    for (Attachment att : eml.getAttachments()) {
        if (att.getContentId() != null && att.getContentId().length() > 0) {
            att.getContentDisposition().setInline(true);
        }
    }
}