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 Jun 25, 2024 1:02 pm

We're using Spire.PDF to convert PDFs to PDF/A. This works well, and the productive solution runs within a Docker container where we add Windows fonts.
However, for building and testing it's difficult. Trying to convert a PDF which was written with the "Arial" font results in
class com.spire.ms.System.Exception: No 'Arial' font found!


Is there any way to configure Spire.PDF to use a certain path to find fonts?

cristalp
 
Posts: 2
Joined: Tue Jun 25, 2024 12:50 pm

Wed Jun 26, 2024 2:16 am

Hello,

Thanks for your inquiry.
Kindly note that the document conversion process requires font files. If the system lacks the fonts used in the file, the program may throw an exception. Therefore, we recommend that customers install the fonts in the running environment. Of course, we also provide another way. Customers can specify the path where the font file is located through the following code, provided that you need to create a folder to store the font file. If you have any other questions, please feel free to write back.
Code: Select all
 PdfDocument.setCustomFontsFolders("fontfolder");


Sincerely,
William
E-iceblue support team
User avatar

William.Zhang
 
Posts: 451
Joined: Mon Dec 27, 2021 2:23 am

Wed Jun 26, 2024 7:10 am

Hi William

Thanks for your answer, I'll try it!

Best regards,
Eric

cristalp
 
Posts: 2
Joined: Tue Jun 25, 2024 12:50 pm

Return to Spire.PDF