Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Fri Apr 19, 2019 9:10 am

Hi,

I am trying to use Spire.Presentation on my new Mac and I get exception "Cannot found font installed on the system" error every time I close pptx fixe after opening, even if I don't do any modifications of the file.

That happens with any pptx file.

Everything works fine when I use my old laptop with Windows.

I tried to install all fonts provided by MS Word on my Mac but it did not help.

Code: Select all
var pre = new Spire.Presentation(stream, FileFormat.Pptx2013);
pre.SaveToFile(currentStream, FileFormat.Pptx2013); // Exception happens here
pre.Dispose();


StackTrace:
" at spr⼀.ᜀ(String A_0, FontStyle A_1, String A_2)\\n at spr⼆.ᜀ(String A_0, Single A_1, FontStyle A_2, String A_3, FontStyle A_4)\\n at spr⼆.ᜀ(String A_0, Single A_1, FontStyle A_2, String A_3)\\n at spr⼆.ᜀ(String A_0, Single A_1, FontStyle A_2)\\n at spr⁗..ctor(String A_0, Single A_1, FontStyle A_2)\\n at spr .ᜃ(Single A_0)\\n at spr .\\u1716()\\n at sprᝆ.ᜁ(String A_0, spr  A_1)\\n at sprᝆ.ᜀ(ᜄ A_0, ᜄ A_1, TextRange A_2, spr [] A_3)\\n at sprᝆ.ᜀ(ᜄ A_0, ᜄ A_1, TextRange A_2, Single& A_3, Single& A_4)\\n at sprᝆ.ᜀ()\\n at sprᝆ..ctor(TextParagraphProperties[] A_0, ParagraphCollection A_1, Single A_2, Single A_3, Int32 A_4, Single A_5, Boolean A_6, TextAnchorType A_7, Boolean A_8, ActiveSlide A_9, ᜀ A_10, LocaleFonts A_11, FontCollectionIndex A_12, Single A_13, Single A_14, Int32 A_15, Object A_16)\\n at sprᝥ.ᜀ(Single A_0, Single A_1, ShapeStyle A_2, sprᝥ[] A_3, spr\\u175c A_4)\\n at sprᝍ.ᜀ(GraphicFrame& A_0, RectangleF& A_1, Single& A_2, Single& A_3, Single& A_4, Single& A_5, spr\\u175c A_6)\\n at sprᝍ.ᜎ()\\n at sprᝍ.ᜀ(sprᢛ A_0)\\n at Spire.Presentation.Collections.ShapeList.ᜀ(sprᢛ A_0)\\n at Spire.Presentation.GroupShape.PptxPrepareForSaving(sprᢛ saveContext)\\n at Spire.Presentation.ActiveSlide.PresentationBeforeSave(sprᢛ saveContext)\\n at spr\\u1754.ᜀ(sprᢛ A_0)\\n at spr\\u1759.ᜀ(sprᢛ A_0, sprᜪ A_1)\\n at spr\\u1759.ᜀ(Stream A_0, sprᜪ A_1, spr\\u1f46 A_2)\\n at spr\\u1759.ᜀ(Stream A_0, sprὁ A_1, sprὂ A_2)\\n at spr\\u1759.ᜀ(Stream A_0, sprὁ A_1)\\n at Spire.Presentation.Presentation.SaveToFile(Stream stream, FileFormat fileFormat)\\n at DeckRobot.API.Services.Preprocessing.TextPreprocessor.Execute(Stream currentStream) in /Users/aliakseipatapau/Documents/workspace/deckrobot/ai-api/DeckRobot.API/Services/Preprocessing/TextPreprocessor.cs:line 63\\n at DeckRobot.API.Services.PresentationService.TrainPresentationProcessor.Execute(Stream prePptxStream, Stream defImgStream) in /Users/aliakseipatapau/Documents/workspace/deckrobot/ai-api/DeckRobot.API/Services/PresentationService/TrainPresentationProcessor.cs:line 57\\n at DeckRobot.API.Services.PresentationService.SpirePreProcessor.ProcPreAsync(Stream prePptxStream, Int32 preDbEntityId, String preType, CancellationToken token) in /Users/aliakseipatapau/Documents/workspace/deckrobot/ai-api/DeckRobot.API/Services/PresentationService/SpirePreProcessor.cs:line 152\\n at DeckRobot.API.Services.PresentationService.SpirePreProcessor.ProcPreAsync(Presentation waitPreDbEntity, CancellationToken token) in /Users/aliakseipatapau/Documents/workspace/deckrobot/ai-api/DeckRobot.API/Services/PresentationService/SpirePreProcessor.cs:line 114\\n at DeckRobot.API.BackgroundHosts.TasksManager.<>c__DisplayClass9_2.<<ExecuteAsync>b__7>d.MoveNext() in /Users/aliakseipatapau/Documents/workspace/deckrobot/ai-api/DeckRobot.API/BackgroundHosts/TasksManager.cs:line 188\\n--- End of stack trace from previous location where exception was thrown ---\\n at DeckRobot.API.BackgroundHosts.TasksManager.<>c__DisplayClass9_0.<<ExecuteAsync>b__1>d.MoveNext() in /Users/aliakseipatapau/Documents/workspace/deckrobot/ai-api/DeckRobot.API/BackgroundHosts/TasksManager.cs:line 188"
Last edited by AdamShakhabov on Fri Apr 19, 2019 10:38 am, edited 1 time in total.

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Fri Apr 19, 2019 10:34 am

Hi,

Thanks for your inquiry.
Could you please provide your input PPTX file ? Then we could look into your case accurately and help you accordingly. You could attach it here or send it to us via email (support@e-iceblue.com). Thanks in advance.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Fri Apr 19, 2019 10:39 am

Hi @Nina.Tang

Sure, just attached the the main post. Also to this message

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Mon Apr 22, 2019 7:37 am

Hi @Nina.Tang,

How is going? Do you think it can be fixed soon?

Thanks in advance.

AdamShakhabov
 
Posts: 40
Joined: Wed Sep 26, 2018 12:03 pm

Mon Apr 22, 2019 12:58 pm

Hi,

So sorry for late reply as weekend.
I initially tested your file with the latest Spire.Presentation Pack Hotfix Version:4.4.3 on MAC, but didn't encounter the issue you mentioned. I will do more investigation and update you ASAP.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Wed Apr 24, 2019 7:20 am

Hello,

Sorry for long silence.
Finally, I reproduced the issue on my side. The issue has been posted to our Dev team for investigating and fixing. If it is resolved or there is any update, I will inform you.
Sincerely apologize for the inconvenience caused.

Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Thu Nov 14, 2019 5:34 pm

Did this ever get resolved? I am current getting this same error on my Mac(10.15) with Spire.Presentation:4.10.2 using dotnet core. I also see the same error with FreeSpire.Presentation:4.1.0.

jdaniels
 
Posts: 1
Joined: Thu Nov 14, 2019 5:18 pm

Fri Nov 15, 2019 2:55 am

Hi jdaniels,

Thanks for your inquiry.
Sorry that the issue is not solved yet. Since each document has unique structure, could you please provide your files so that we could record your issue in our system?

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy.jiang
 
Posts: 3099
Joined: Tue Sep 06, 2016 8:30 am

Fri Jul 31, 2020 7:21 pm

Any update on this? Seems like a relatively basic thing I'm trying to do here. While filling in a form field, I'm trying to adjust the font of that field:

Code: Select all
if (!String.IsNullOrEmpty(fieldValue))
{
     var field = (PdfTextBoxFieldWidget)formWidget.FieldsWidget[fieldName];
     PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", 10f, FontStyle.Regular));
     field.Font = font;
     field.Text = fieldValue;
}


I get "An unhandled exception of type 'System.InvalidOperationException' occurred in Spire.Pdf.dll: 'Cannot found font installed on the system." when trying to create the font.

I've tried a few different font names; all result in the same exception.

djarmoluk
 
Posts: 9
Joined: Fri Jul 31, 2020 7:13 pm

Mon Aug 03, 2020 9:29 am

Hi David,

Thanks for your inquiry.
I did an initial test with the latest Spire.PDF Pack(Hot Fix) Version:6.7.12, but did not reproduce your issue. If you are using an older version, please try again with the latest version .
If the problem persists, please provide your input file and your full test code to help us investigate further. You can upload your file here or send it to us(support@e-iceblue.com) via email. Also, please tell us your OS information (E.g. Windows 7, 64 bit) and region setting (E.g. China, Chinese). Thanks in advance.

Sincerely
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Fri Aug 07, 2020 9:25 am

Hi David,

Greetings from E-iceblue.
How is your issue now? Could you please give us some feedback at your convenience?

Sincerely
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Fri Aug 14, 2020 6:39 pm

I'm having the same issue with 6.8.1.

It's raising an exception on this line:

Code: Select all
PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", 10f, FontStyle.Regular));


Here is the full stack trace:

Exception has occurred: CLR/System.InvalidOperationException
An unhandled exception of type 'System.InvalidOperationException' occurred in Spire.Pdf.dll: 'Cannot found font installed on the system.'
at spr⏈.ᜀ(String A_0, FontStyle A_1, String A_2)
at sprᢓ.ᜈ()
at sprᢓ..ctor(Font A_0, Single A_1)
at Spire.Pdf.Graphics.PdfTrueTypeFont.ᜀ(Font A_0)
at Spire.Pdf.Graphics.PdfTrueTypeFont..ctor(Font font, Single size, Boolean unicode)
at Spire.Pdf.Graphics.PdfTrueTypeFont..ctor(Font font, Boolean unicode)
at Spire.Pdf.Graphics.PdfTrueTypeFont..ctor(Font font)
at premier.pdf.testing.Program.SetFieldValue(String fieldName, String fieldValue, PdfFormWidget formWidget) in /Users/djarmoluk/Projects/premier.api.utilities/Program.cs:line 79
at premier.pdf.testing.Program.CreateFax(Int32 followUpId, Int32 coverPageId) in /Users/djarmoluk/Projects/premier.api.utilities/Program.cs:line 51
at premier.pdf.testing.Program.Main(String[] args) in /Users/djarmoluk/Projects/premier.api.utilities/Program.cs:line 32

Thought I mentioned this before, but don't see that I did. I'm doing my development on a Mac, using .NET Core 3.1.

djarmoluk
 
Posts: 9
Joined: Fri Jul 31, 2020 7:13 pm

Fri Aug 14, 2020 9:04 pm

I was able to get the following to work.

Code: Select all
 PdfFont fieldFont = new PdfFont(PdfFontFamily.Helvetica, 10f);

djarmoluk
 
Posts: 9
Joined: Fri Jul 31, 2020 7:13 pm

Mon Aug 17, 2020 12:04 pm

Hi djarmoluk,

Thanks for your feedback and sorry for the late reply as weekend.
Please make sure that your have installed the corresponding font on your system. In addition, we provide another method to create the font object without installing the font on system, you can give it a try. Looking forward to your further feedback.

Sincerely,
Elena
E-iceblue support team
User avatar

Elena.Zhang
 
Posts: 279
Joined: Thu Jul 23, 2020 1:18 am

Mon Aug 17, 2020 3:20 pm

The fonts are installed, else the PdfFont approach I took wouldn't have worked either.

Would be good to know the difference in my approach vs. what your docs suggest. A font not being installed is not the issue here.

djarmoluk
 
Posts: 9
Joined: Fri Jul 31, 2020 7:13 pm

Return to Spire.Presentation