I'm trying to convert a ppt file to a png file. Currently the font type seems to be changing, so one letter of the word is on a seperate line. The font class looks as though it holds all fonts from the slide.
This problem seems to happen for a number of slides we have. Please can you investigate / advise.
Code:
Presentation p = new Presentation ("C:\\strat.ppt");
I have run your code and generated the image which is attached. I don't see anything wrong. It looks exactly like the original slide in the strat.ppt. In the original slide, one letter of the word is already on the separate line.
The reason I think the letter ‘r’ is showing on a new line in the PowerPoint presentation you have is because you do not have the font 'Expert Sans Light’ (this is a custom font we use). The text in this slide is in this font. No doubt it therefore defaults to Arial when you open it (which is a wider font than Expert Sans Light) causing the text to re-format and hence drop onto a second line.
However, I have the font ‘Expert Sans Light’ loaded on my PC as well as the web server and it doesn’t seem to get picked by aspose.slides, although it is shown in the font class. Therefore the font defaults to Arial. Is there a way to get this font picked up by Aspose.slides so the conversion is correct?
We use various Expert Sans fonts so we need these to be reflected in the pgn image in order to reflect the correct formatting.
On my PC, Expert Sans Light is installed. When I open your presentation, the r inside "Stakeholder Pension" is shown on the next line. Further, when I click on this text, the font name Expert Sans Regular is shown rather than Expert Sans Light.
I have attached the screen shot of your presentation as viewed on my PC. Additionally, if I manually select the text and change its font to Expert Sans Light, r still remains on next line.
Although it will pick up the font name Expert Sans Regular / Light within PowerPoint, this font will not be used as I suspect the font will not be on the PC you have (look in control panel - fonts). The font therefore actually defaults to Arial (even though in the font field it does say Expert Sans Regular). The Expert Sans Regular and Expert Sans Light are totally different fonts to Arial and can be distinguished visually. Perhaps it may be worth trying to change the font in the presentation you have to Arial and see if it does actually change.
Is there a way for custom fonts to be picked by Aspose.Slides? We have an array of slides which use these custom fonts (400-500).
Yes, your observations are right. Can you please attach the screenshot of your original presentation and its thumbnail image taken by Aspose.Slides?
And are these two fonts Expert Sans Regular and Light installed on your PC. Can you please tell me, where can I get these fonts from and install on my PC?
The following code iterates all the text boxes in your presentation and prints their font names on console. To add a new font, see this thread.
Please find attched a zip file cotaining the fonts, screenshot of the presentation and the png image file. You will need to add the fonts by going to Control Panel -> Fonts ->File-> Install New Font