Hello,
Thank you for your inquiry.
Your issue is likely caused by the absence of common fonts such as "Arial" in the Linux system. To avoid this issue, please install the "Arial," "Times New Roman," and "Calibri" fonts into the system. If you prefer not to install these fonts, you can create a directory to store the fonts, copy these fonts into that directory, and use the following code to specify the font directory.
- Code: Select all
String fontpath = "/fonts"; //The fonts folder includes arial fonts, timesnewroman fonts, calibri fonts, etc
com.spire.pdf.PdfDocument.setCustomFontsFolders(fontPath);
If the issue still persists, please provide us with your test code, your input files, your system information (e.g., CentOS 7, 64-bit), and complete error logs or screenshots to help us investigate further. Thanks in advance. You can upload these as attachments or send them to
[email protected].