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

Free Support Forum - aspose.com

System.ArgumentException in System.Drawing.dll ("Font 'zapfdingbats' cannot be found") when creating a pdf document

I am using Aspose.pdf version to create reports from my asp.net mvc website. The packet has a coversheet that is converted from html and concatenated to an existing pdf. I am creating 3-150 of these documents and returning them as a zip.

When I convert the html to pdf I am getting multiple System.ArgumentException in System.Drawing.dll ("Font 'zapfdingbats' cannot be found") caught exceptions when I create a new pdf from html. I am also getting a couple 'System.Runtime.InteropServices.ExternalException' in System.Drawing.dll ("A generic error occured in GDI+.") exceptions. See the attached screenshot below.

I am not sure if this is the reason but the conversion from html to pdf seems to take longer than expected. I also notice that the creation of ~5 pdfs that range from 1 to 15 pages of text causes the memory load on the server to go up by over 200MB and it doesn't seem to go back down after future garbage collections.

This gives me concern where I will need to be able to create many many more similar pdfs reasonably quickly for my users.

  1. Is there something that needs to be installed on the server to get rid of these exceptions?
  2. These documents are being packaged and sent to the end user, but the downloaded zip is less than 1MB and the unzippped size is less than 2MB. Is there something I can do to reduce the memory load?

The html that gets converted is very simple:
@model CourseWork
var inPacketCount = ((int?)ViewBag.InPacketCount).GetValueOrDefault();


@Model.CourseWorkRequirement.Title - @Html.Raw(Model.CourseWorkRequirement.WorkPeriodRangeText)

@inPacketCount exams delivered to @Model.InstructorText:  

Hi Logan,

Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 11.2.0 in Visual Studio 2010 project with .NET Framework 4.0 and I am unable to notice any issue. As per my observations, the HTML file is properly being converted to PDF format.


// load source HTML document<o:p></o:p>

Document doc = new Document("c:/pdftest/input_resultant.html", new HtmlLoadOptions());

// save resultant PDF file


Are you not getting any errors at all (even first chance)? I have tried this on multiple systems and always seem to get the error in my logs.

The output looks OK, but takes longer than I would expect to do the conversion and I was hoping fixing this would speed it up. Is it something that needs to be installed on my server?

Hi Logan,

Thanks for sharing the details.

I performed the testing using latest release and did not notice any problem. In fact I do not have any specific application/software installed or any particular configurations. So you may consider using latest release and see if it resolves the problem. In case you still face the same issue with latest release, please share your sample project, so that we can test the scenario in our environment. We are sorry for your inconvenience.