Share via

.Net core deployed application not supporting Chinese font in PDF.

Deepak Ramesh (SX/EDA2) 0 Reputation points
2024-04-29T06:30:59.03+00:00

I have chines font in my code when the app is deployed in app service and there is a logic to download the PDF file with the Chinese font, but the font is not visible.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.

Developer technologies | ASP.NET Core | Other
0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-04-29T09:04:45.8666667+00:00

    Hi @Deepak Ramesh (SX/EDA2),

    Please follow my steps to try it.

    1. Add a fonts folder in your project and paste the .woff files.
    2. Make sure it exist in your publish files.
    3. Add below code in your web.config file, you can edit it in App Service Editor.
         <system.webServer>
         <staticContent>
           <remove fileExtension=".woff" />
           <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
         
           <remove fileExtension=".woff2" />
           <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
         </staticContent>
         </system.webServer>
         
      

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,

    Jason

    Was this answer helpful?

    0 comments No comments

Your answer

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