Hi Team, we are using upgraded aspose.slide library v21.02.0, where are not able generate tumbnail image properly and exporting it to ppt and pdf showing a blank slide, it working some times correct and sometime it is not,
if i use v20.10 library it working fine with loading custom fonts in tumbnails and exporting to pdf, but here only exporting to ppt is not loading correct font styles ,
Please help me to reslove this issue.
Hi Andrey, I have noticed if slides contains font -family of Hp simplified light ,Hp simplified bold etc are in slide then it is not working properly. Thumbnails is showing blank if it has text. if text has Hp Simplified then it applying.
I have used v20.10, with loading memory fonts externally then except thumbnail its working fine.
// LoadOptions loadOptions = new LoadOptions(LoadFormat.Auto);
// loadOptions.DocumentLevelFontSources.FontFolders = new string[] { “assets\fonts”, “global\fonts” };
// loadOptions.DocumentLevelFontSources.MemoryFonts = getMemoryFontsofTtf();
presentation = new Presentation(slidePath);
var slide = presentation.Slides[0];
var image = GetImage(slide, height, width);
if (image != null)
{
using (var stream = new MemoryStream())
{
image.Save(stream, ImageFormat.Jpeg);
return stream.ToArray();
}
}
@MahadeviKumbar,
I cannot check your code example containing an unknown GetImage method.
I made a presentation containing a text with “Hp Simplified” font. I made a slide thumbnail and found no problems.
You should share your own presentation file for investigating the issue. Also, please share a comprehensive code snippet and fonts that are used in the presentation.
If slide contains font families like HP Simplified , HP Simplified Light, HP Simplified Bold, HP Simplified Bold Italic, HP Simplified Regular then it sometime works, and some time not working for exporting pdf, ppts and thumbnails also.
I’m loading all font families while exporting the slide. For the fonts you can get by downloading from internet.
I’m running on windows with intel core- i5 processor, Fonts are not installed on machine/client. We are having fonts in separate folder of our project and externally I’m loading all the hp font faces of HP font-family while exporting a slide into .pdf, .ppt and .jpg formats.
I want to clarify whether all-font faces are required to install on client/remote machine? Then it works?
FYI: I’m loading all the hp font faces of HP font-family while exporting a slide into .pdf, .ppt and .jpg formats. In my local its working fine but After the deployment code, it is not working properly when remote pc/client system those who not having these HP fonts.
@Andrey Potapov I have tried with suggestion what are you shared in the comments. Still I’m facing same issue i.e. while downloading ppt. are not showing correct font format. Please can you suggest any other ways.
@Andrey_Potapov , While embedding fonts on slide thats works if slide does not having any links /other special formats,
How to handle links which does in the slide image002.jpg (169 Bytes)
Is your client’s operating system also Windows?
Please check the accessibility of fonts in the client’s machine (try to read the “Hp Simplified” font file).
Could you please share a simple standalone project with the problem for investigation on our end?
Also, you can try to load external fonts as below:
FontsLoader.LoadExternalFont(File.ReadAllBytes("font.ttf"));
try
{
using (Presentation presentation = new Presentation("pres.pptx"))
{
presentation.Save("out.pdf", SaveFormat.Pdf);
}
}
finally
{
FontsLoader.ClearCache();
}
I don’t know which operation system may they will use. But I’m running on Windows operating system still I’m unable to see expected fonts on ppt. I tried your solution that did not work for me.
While embedding font on slide works if its does not contains any links/special format.