Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue Feb 01, 2022 4:13 pm

Hi,
I'm getting a error on my kubernetes environment when saving pdf as image. Error is
"System.TypeInitializationException: The type initializer for 'sprᜭ' threw an exception.\n ---> System.InvalidOperationException: Cannot found font installed on the system.\n
at spr╨.ᜀ(String A_0, FontStyle A_1, String A_2)\n at sprᜎ..ctor(String A_0, FontStyle A_1)\n at sprᜌ..ctor(String A_0, Single A_1, FontStyle A_2)\n
at sprᜭ..cctor()\n --- End of inner exception stack trace ---\n at spr⪷.ᜃ()\n at spr⪷.ᜁ(Single A_0)\n at spr⪷.ᜃ(Single A_0)\n
at spr⩗.ᜀ(sprᜏ A_0, spr⩔ A_1, Boolean A_2, Boolean A_3)\n at spr⩗.ᜁ(sprᜏ A_0, spr⩔ A_1, Boolean A_2, Boolean A_3)\n
at spr⩔.ᜀ(String A_0, spr⪷ A_1, String A_2, Boolean A_3)\n at spr⩔.ᜀ(String[] A_0, String A_1)\n at spr⩔.ᜀ(spr⪺ A_0)\n at spr⩔.᜼()\n at spr⩔.ᜍ(Boolean A_0)\n
at spr᪀.ᜀ(sprᜏ A_0, spr⩋ A_1, spr⪹ A_2, spr⪻ A_3, sprᜓ A_4)\n at spr᪀.ᜁ(Int32 A_0, Int32 A_1, Int32 A_2)\n at Spire.Pdf.PdfDocumentBase.ᜀ(Int32 A_0, Int32 A_1, Int32 A_2)\n
at Spire.Pdf.PdfDocumentBase.ᜁ(Int32 A_0)\n at Spire.Pdf.PdfDocument.SaveAsImage(Int32 pageIndex)\n"

This library works fine in local and Azure Linux app service. But it continues to give above error inside Docker.
Environment in .NET core 3.1 and I have used spirePDF 7.8.9 and Dependency Libraries are "SkiaSharp 2.80.3" and" SkiaSharp.NativeAssets.Linux.NoDependencies 2.80.3"

rmdevsam2
 
Posts: 4
Joined: Tue Feb 01, 2022 4:00 pm

Wed Feb 02, 2022 7:47 am

Hello,

Thanks for your inquiry.
First, please install all fonts used in your pdf file on Docker.
Besides, because you are using an old version of our Spire.PDF, we recommend you upgrade to the latest version and try again.
If the issue persists, please provide you input file for further investigation. Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Feb 02, 2022 8:45 am

Thank you for the response. I will try the given approach

rmdevsam2
 
Posts: 4
Joined: Tue Feb 01, 2022 4:00 pm

Return to Spire.PDF