Convert html to pdf does throw an exception when calling from vsto plugin

Hi all,

we are looking for a .net pdf library to save mails from outlook in pdf.
At the moment I am trying to integrate aspose.pdf into an outlook vsto plugin. I want to save the mail body as html and then convert them into pdf via aspose.pdf.
But if I try to open the html file in aspose and convert it to pdf it throws me an exception “failed to parse base url”.
The same setup with a console application works fine so it seems that it is something related to calling aspose.pdf from a vsto addin.

HtmlLoadOptions htmloptions = new HtmlLoadOptions();
Document doc = new Document(@“e:\temp\basic.html”, htmloptions);

I can also recreate the error with a new vsto project.

Any suggestions
Best regards,
Mark

@Wompipomp

Thank you for contacting support.

You may try Aspose.Email for .NET API to achieve your requirements. For further details about converting emails to PDF, please visit Converting Email message to PDF.

We hope this will be helpful. Please feel free to contact us if you need any further assistance.