Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Nov 21, 2024 3:48 pm

Hi,

Thanks for you help!

When I ported the code to test on a Linux (RH9.5 server, with Linux version of spire.doc and spire.xls modules installed) system, I got 'Cannot found font installed on the system' on 'AutoFitColumns()' call.

The error message is attached (I added 'try ... except ...' in the code to catch exceptions).

Can you help?

TIA

pbsd92128
 
Posts: 11
Joined: Tue Oct 08, 2024 9:14 pm

Fri Nov 22, 2024 8:21 am

Hello,

Thanks for your inquiry. The reason for this error is likely that the font file you need in the program cannot be found in your system. We suggest that you copy the commonly used fonts in the Windows system to Linux system(Linux system font path reference: /usr/share/fonts). Or you can use 'workbook.CustomFontFileDirectory = ["fontpath"]' in the program to specify the path of the font folder after uploading, and ensure that the program has access to these fonts. Finally, if the issue still persists, please provide feedback at any time.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Mon Dec 02, 2024 8:45 pm

Hi, thank you for your suggestion!

I copied windows fonts to Linux per your suggestion, and the font error is gone.

But I got 'Runtime Error: ffi_prep_cif_var failed' in the call to worksheet.AllocateRange.IsWrapText().

The error message is attached below (forget line numbers in the screenshot - I added comments and some 'try' clauses to catch except). The code is the same (except the line numbers) as my previous post.

The spire.doc module is 12.7.1 with date of 2024/7/14,

The system is Redhat 9.5 (Plow).

Please let me know if you need any more info for the troubleshooting.

TIA

pbsd92128
 
Posts: 11
Joined: Tue Oct 08, 2024 9:14 pm

Tue Dec 03, 2024 7:31 am

Hello,

Thanks for your feedback. This issue has been fixed in Spire.XLS for Python Version:14.9.3. If you are not using the latest version, please update and try again. If the issue persists after the update, please feel free to provide feedback at any time. Thank you in advance.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.Doc