My use case is very simple, I have tried 2 xlsx files both with 1 word in cell A1 "hello". I first tried the default calibri font, then switched to
DejaVu sans.
I am running on a Debian container AND the fonts are present - see below:
- Code: Select all
root@bbda758b9700:/usr/share/fonts/truetype# fc-list
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/truetype/calibri/calibri.ttf: Calibri:style=Regular
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
/usr/local/share/fonts/calibri.ttf: Calibri:style=Regular
/usr/share/fonts/truetype/dejavu/DejaVuSerif.ttf: DejaVu Serif:style=Book
But I get the following error:
- Code: Select all
File "/usr/local/lib/python3.11/site-packages/plum/function.py", line 592, in __call__
return _convert(method(*args, **kw_args), return_type)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/spire/xls/Workbook.py", line 941, in SaveToFile
CallCFunction(GetDllLibXls().Workbook_SaveToFileF, self.Ptr, fileName,enumfileFormat)
File "/usr/local/lib/python3.11/site-packages/spire/xls/common/__init__.py", line 109, in CallCFunction
raise SpireException(info)
spire.xls.common.SpireException: Cannot found font installed on the system.: at sprsu5.spra(Stream) + 0x81
at Spire.Xls.Core.Spreadsheet.XlsWorkbook.SaveToPdf(String) + 0x16b
at Spire.Xls.AOT.NLWorkbook.Workbook_SaveToFile(IntPtr, IntPtr, Int32, IntPtr) + 0x71
What else can I try? (I did try the set customfilefontpath call on workbook - that does not seem to work either - unless I am using it incorrectly)
Any help greatly appreciated.