We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Save outlook email html to PDF- System.NotSupportedException: "The given path's format is not supported."

I have the following code that saves a MapiMessage to a PDF.

This works when I do not set the HtmlInfo.ImgUrl property, When I do I get an exception
System.NotSupportedException: “The given path’s format is not supported.”.
 var licence = new Aspose.Pdf.License();
licence.SetLicense(@“C:\Aspose.Total.lic”);

var message = MapiMessage.FromFile(@“C:\email.msg”);

foreach (var at in message.Attachments)
{
at.Save(Path.Combine(“c:\pdf”, at.FileName));
}

var pdf = new Pdf();
var section = pdf.Sections.Add();

var bodyText = new Text(section, html);
bodyText.IsHtmlTagSupported = true;;
section.Paragraphs.Add(bodyText);

pdf.HtmlInfo.ImgUrl = @“C:\pdf”;
pdf.Save(@“C:\pdf\blah.pdf”);

Hi Andrew,

First of all sorry for the delay in response and thanks for using our products.

I tested your scenario but unable to find any System.NotSupportedException using Aspose.Pdf for .NET v6.6 and Aspose.Email for .NET v1.3. Kindly download and use the latest version of Aspose.Pdf for .NET v6.6 and Aspose.Email for .NET v1.3 and check if it fits your need. Please feel free to contact support in case you need any further assistance.

We apologize for your inconvenience.

Thanks & Regards,

I am using the latest PDF and Email versions! How do I contact support?

Turns out this won’t work!


You can’t pass a fully qualified path with a colon : in it.

I have a scenario where I am saving the html images locally and they aren’t rendering on my pdf, is there any work around for this?

Hi Andrew,

I have tested the scenario again but unable to replicate your issue at my end. However, to exactly replicate your issue at our end, we would appreciate, if you create a sample application with your template files and post here to show us the issue. This will help us regenerate the issue and reply back to you soon.

We apologize for the inconvenience.

Thanks & Regards,