Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Nov 18, 2015 5:55 am

I have installed an OpenType font on my PC and generated a PDF using it. The problem arises when I need to deploy the solution to Microsoft Azure, where I don't have access to install the font. Is there a recommended procedure for achieving this?

Thanks
Julian

julians26
 
Posts: 8
Joined: Thu Oct 15, 2015 1:26 am

Wed Nov 18, 2015 8:31 am

Hi Julian,

Thanks for your inquiry.
Please edit the web.config file in your application likes this:
Code: Select all
<configuration>
  <system.webServer>
    ...
    <!-- Allow our OpenType font files to be served. -->
    <staticContent>
      <mimeMap fileExtension=".otf" mimeType="font/otf" />
    </staticContent>
    ...
  </system.webServer>
</configuration>

Here is the related link for your reference.
http://fhellwig.com/2015/07/08/serving- ... rom-azure/
Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Mon Nov 23, 2015 8:34 am

Hi Julian,

Has your issue been resolved?
Thanks for your feedback.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Thu Nov 26, 2015 3:45 am

Amy

Thank you, yes, the issue has been resolved using
Code: Select all
PdfTrueTypeFont font = new PdfTrueTypeFont(HttpContext.Current.Server.MapPath("~/Content/Fonts/myfont.otf"), 13.5f);
in the code and modifying the Web config as you suggested.

Thanks
Julian

julians26
 
Posts: 8
Joined: Thu Oct 15, 2015 1:26 am

Thu Nov 26, 2015 3:49 am

Hi Julian,

Thanks for your feedback.
I am glad that your issue has been resolved.
Welcome to write to us again for further problems.

Best Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 3011
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.PDF