Hello,
We are trying to convert a DOCX to PDF using spire.doc v12.3.12 in .net8 and we are getting this error:
System.InvalidOperationException: 'Cannot find any fonts in specified font sources.'
The code I am using is as follows:
string subPath = "wwwroot/temp/";
Spire.Doc.Document doc2 = new Spire.Doc.Document();
doc2.LoadFromFile(@subPath + "/" + formSubmissionId.ToString() + ".docx");
bool fileexists = System.IO.File.Exists(subPath + "/" + formSubmissionId.ToString() + ".pdf");
if (fileexists)
System.IO.File.Delete(subPath + "/" + formSubmissionId.ToString() + ".pdf");
//Convert Word to PDF
doc2.SaveToFile(subPath + "/" + formSubmissionId.ToString() + ".pdf", FileFormat.PDF);
I have uploaded a sample word document with some details modified to protect the user.
If you need anything else, please let me know.
Thanks
Michael