We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Using special characters causes PDF library to crash in docker

When special characters are encountered, such as the ° symbol when running inside a docker container the following error is thrown:

app_1  | Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
app_1  |    at Aspose.Pdf.Text.Font..ctor(#=zIeekTqBn_681KsTbazA$Esk= #=zi1KmaYg=)
app_1  |    at #=z8hvi3dDxmmrMvE7_zssGl7j1HEgjwiQ5a1CuXqf6wCCjh26I3ryEPjw=.#=zy8mim9jCF72nlFzIiBGUIgzJLTwa(String #=zDYqJm8o=, Font #=zi1KmaYg=, Font& #=zWfJrMbGoA3Mi6ntWOaszxGU=)
app_1  |    at #=zxAbyhYtY07Qh7rw3NIv8ZU3Hf8XU.#=zVIe52ToSwRM7(String #=zngxtGG0=)
app_1  |    at Aspose.Pdf.Text.TextFragment.#=z9qdNuS68Gepo(String #=zngxtGG0=)
app_1  |    at Aspose.Pdf.Text.TextFragment..ctor(String text)
app_1  |    at PdfSpecialChar.Program.Main(String[] args) in /app/PdfSpecialChar/Program.cs:line 43
pdfspecialchar_app_1 exited with code 139

I am attaching a sample app to show this behavior.

The Aspose.Total.lic file has been blanked for obvious reasons, so you will have to add a license file. If you don’t have a licence file set other errors are thrown.

To build the project: docker build -t pdf-special-char .

To run the project: docker-compose up

Thank you,
~Tim

PdfSpecialChar.zip (333.8 KB)

@TimothyBlue

We need to further investigate whether this issue is related to specific font that you are using or with your specific docker environment as we initially tested the scenario in Windows 10 environment and were unable to notice the exception. We have logged an investigation ticket as PDFNET-48451 in our issue tracking system. We will further look into its details and keep you posted with the status of its resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

The issue only happens in a linux docker container which is what we use for our web apps. When run in a windows environment everything is fine.

The docker environment I supplied in the sample should easily reproduce this issue.

~Tim

@TimothyBlue

We will surely investigate the issue from this perspective and share updates with you as soon as we have some.

This issue is critical to our release and I would like to move it to our paid support forums.

Thank you,
~Tim

@TimothyBlue

Please create a post in paid support forum with the reference of logged ticket ID and your issue will be escalated accordingly.