Converting a Japanese doc to pdf outputs boxes instead of hieroglyphs

Viewed 54

I'm developing a service which is supposed to convert a document of different formats to pdf. All works just fine with English documents, but with Japanese the result leaves much to be desired. Namely, instead of hieroglyphs I'm getting just empty boxes - My service is running as a Windows container and the base image is mcr.microsoft.com/dotnet/framework/runtime:4.7.2-20210209-windowsservercore-ltsc2019 I tried to install different fonts like MS Mincho or MS Gothic with no luck

1 Answers

Have you checked if the installation of these fonts succeeded? Installing fonts on Server Core is not trivial. We're currently working on putting out an official guidance on how to install fonts on Server Core for Windows containers. In the meantime, have you tried the Windows or Server images? They are larger images, but they contain other fonts. The caveat, is that DotNet did not build an image on this base, so you'd have to build one leveraging the docker file they publish. For example, for the image you referenced, this is the dockerfile: https://github.com/microsoft/dotnet-framework-docker/blob/d4095f39459c58f1951abbf21cf0a2b95458fac4/src/runtime/4.7.2/windowsservercore-ltsc2019/Dockerfile

You'd have to change the FROM statement on the dockerfile to mcr.microsoft.com/windows/server:ltsc2022 for Windows Server 2022 or mcr.microsoft.com/windows:1809 for Windows Server 2019.

Related