Convert Task to PDF

Hello,

Is there a way to convert a Task, saved as a MSG file, into a PDF file that looks similar to what is produced with the Print Preview with Outlook?

We have a need to support MSG files as emails, tasks, calendar, notes,contacts and appointments and convert them to PDF. We would like the output, if possible, to be close to the information shown in Outlook’s PrintPreview.

I was able to get the Emails and Appointments pretty close, but am having issues with tasks - it looks like moving to MHTML makes it print as an email with From/Sent/etc.fields and not a task with its Status/Percent Complete/Total Work/etc…

TaskToPDFPrinted.png (29.0 KB)

This is how I am currently creating the PDF file for all MSG files except for Appointments (IPM.Appointment type):

Aspose.Email.Mapi.MapiMessage mailMsg = Aspose.Email.Mapi.MapiMessage.FromFile(FILE_PATH);

MemoryStream msHTML = new MemoryStream();
mailMsg.Save(msHTML, msg_so);

Aspose.Words.Document htmlEmailDoc = new Aspose.Words.Document(msHTML, word_lo);
htmlEmailDoc.Save(OUTPUT_DIR + OUTPUT_NAME, pdf_so);

Thanks,

Sheri

@sheri_steeves,

This is not supported at present. We’ll write you back here once we look into possible implementation of such output.

@kashif.iqbal

Thanks for the quick reply; just making sure I wasn’t missing something obvious before we recreated the Task layout manually in a PDF file.

If you had the same type of PDF/Image creation in this library as in Aspose.Words\Cells etc. that would be great.

Thanks,

Sheri

@sheri_steeves,

Aspose.Email only provides the facility to convert message to MHTML which you can then use to convert to PDF using Aspose.Words API. There is no such feature of converting message to PDF directly using Aspose.Email API.

Just to be sure, can you please confirm if you want output like this for an Outlook task?

Once you confirm to us, we’ll look into the possible implementation of such feature by Aspose.Email API.

@kashif.iqbal

Yes, that is what I am trying to achieve - see my attached image to my first post.

I was already able to get regular email files saved as MSG files to MHTML -> Word -> PDF as you suggested, but I also am looking for support for Tasks, Appointments, ContactInfo and Notes as MSG files and have output matching (or similar to) what occurs when printing via Outlook.

I also need to support .vcs, .vcf and .ics as well as .oft.

Thanks,

Sheri

@sheri_steeves,

Your requirements have been logged as EMAILNET-38981. We’ll update you here once there is some update or a fix version available in this regard.