How to upload custom fonts to Azure AppService and use them in the PDF reporting?

KarimRuiz 1 Reputation point
2020-10-20T15:27:31.727+00:00

How to upload custom fonts to Azure AppService and use them in the PDF reporting?

I need to create a pdf with the following font:

Font Architect Daughter (by Google)

When the form is submitted, a PDF is created, but the Google font would not be included in the process of creating the PDF.

Solution in the server:

  1. Install the form in the Application Server, the ttf file is attached to this ticket
  2. Go to IIS Manager
  3. In the server root, select the option MIME Types
  4. Add the following extensions:

a)

Extension: .ttf

Type: application/octet-stream

b)

Extension: .woff

Type: application/font-woff

c)

Extension: .woff2

Type: application/font-woff2

  1. Make sure the .ttf file is deployed with the application, in Test case it is located in the folder: C:\inetpub\wwwroot\RecoveryMemberTest\Content\Fonts
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,673 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 27,851 Reputation points Microsoft Employee
    2020-10-22T02:19:42.76+00:00

    Hi @KarimRuiz ,

    App Services are sandboxes and certain workflows therefore aren't supported such as PDF generation. To get around this issue, you can deploy your app as a docker container image with the fonts you need installed on it.

    Regards,
    Ryan

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.