Hello there, I’m trying to run a small piece of code that converts PDF to DOCX. I get an InvalidOperationException with a message says “Cannot find any fonts installed on the system”. Here’s my environment:
OS: MacOS Mojave
DotNet core: 2.1.505
Here’s the code I’m running:
Aspose.Pdf.Text.FontRepository.Sources.Clear();
Aspose.Pdf.Text.FontSource pdfFontSource = new
Aspose.Pdf.Text.FolderFontSource("/Users/fawaz/fonts");
Aspose.Pdf.Text.FontRepository.Sources.Add(pdfFontSource);
Document pdf = new Document("/Users/fawaz/Sample.pdf");
pdf.Save("/Users/fawaz/output.docx", SaveFormat.DocX);
Thank you for reading this!