My team is using C# dotnet core to convert html to pdfs, and while it runs well on my local machine (in docker) running the same docker image on an Ubuntu server causes a null reference exception to be thrown from the constructor of Aspose.Pdf.Document. Can anyone provide me with any insight on this? We have to have this working if we’re going to move forward with licensing Aspose.
Would you please try to copy all windows fonts in docker environment and in case you still face any issue, please share your sample code snippet and docker configuration details. We will further proceed to assist you accordingly.
Thanks for the reply - do you have any further information on copying all Windows fonts to a docker container?
You may please find required information over respective forums. An identical discussion is present over Unix StackExchange for copying all windows fonts to docker container. After copying the fonts, you may call following method in order to set default font folder for the API:
Aspose.Pdf.Text.FontRepository.Sources.Add(new Aspose.Pdf.Text.FolderFontSource("/usr/share/fonts"));