aspose-free-consulting / projects

The starting point for Aspose free consulting projects
5 stars 5 forks source link

I want to embed fonts into Powerpoint (pptx) and Word document (docx) files so that they work in Keynote on OSX #350

Closed Capeflair closed 5 months ago

Capeflair commented 7 months ago

I want to embed fonts into Powerpoint (pptx) and Word document (docx) files so that they work in Keynote on OSX. Currently the generated pptx files we get from google slides do work nicely on Macs. We have tried to use the apose.slides/fonts/embedded api to generate files with the fonts embedded but still get errors from Keynote asking to replace the fonts when opening the file.

This is the output once we've embedded the fonts in the file: { "list": [ { "fontName": "Arial" }, { "fontName": "Lexend", "isEmbedded": true }, { "fontName": "Kalam", "isEmbedded": true }, { "fontName": "Lexend Light", "isEmbedded": true } ] }

I've attached the example file I used and the generated file using your api. I've also included a pdf of what the file should look like with the correct fonts.

embeddedFont (5).pptx

photosynthesis-worksheet-answers--pdf.pdf photosynthesis-worksheet-answers--pptx.pptx

The fonts used are: https://fonts.google.com/specimen/Lexend https://fonts.google.com/specimen/Kalam

AlexNosk commented 7 months ago

@Capeflair Regarding MS Word documents. In Aspose.Words you can use FontInfoCollection.EmbedTrueTypeFonts property to embed fonts into the document upon saving. But please note, this option works for DOC, DOCX and RTF formats only. Also, the fonts to be embedded must be available in the system, where the document is processed. Please see Aspose.Words documentation to learn where Aspose.Words looks for fonts and how to specify fonts location: https://docs.aspose.com/words/net/specifying-truetype-fonts-location/

Regarding Powerpoint slides, my colleagues from Aspose.Slides team will answer you shortly.

andreypotapovaspose commented 7 months ago

@Capeflair, As for Aspose.Slides, please check your results using the latest version of Aspose.Slides if possible. If the issue persists, please share the following: