We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problems using custom fonts

Hello,


I tried using custom fonts. Please see attached Files.
I’ve implementet it so:
http://www.aspose.com/docs/display/slidesjava/Using+Custom+Fonts+without+Installing+them

When creating thumbnails now, the image is white.

Please see me attached PPTX.

Kind Regards,
Dirk Münker

Hi Dirk,


Thank you for posting.

I have observed your comments and like to share with you that I am unable to reproduce the issue of blank output image. I have attached the generated image for your kind reference. It appears to be a problem of missing fonts. Please try installing the fonts or load them externally as explained in this documentation article. I am getting the text on thumbnail with just two fonts rendered incorrectly. Please check the same on your side and then share your kind feedback with us.

Best Regards,

Hello Adnan,


I tried using: FontsLoader.loadExternalFonts(PathsFonts);

Only when working with this method, the blank page appears.

Can you please link the documentation (again)?

Thank you and kind Regards,
Dirk Münker

Hi Dirk,


I request you to please visit this documentation article which explains the use of loadExternalFonts method. I am still unable to get blank page as output, after using the aforementioned method. Please share your environment details and check if the fonts used in presentation are installed on your side or not, so that we may investigate it further to help you out.

Best Regards,

Hello Adnan,


ok. I’ve done it so, I think.
Attached you’ll find my code (working code). In class Main you’ll see what I’ve done with the Fonts-Class. Is that ok?

How have you created the image? Do you have the fonts I used?

Kind Regards,
Dirk Münker

Hello,

I’m sorry. I understood some minutes ago I need to address you with Muhammad.

Please excuse me.

Kind Regards,
Dirk Münker
Hi Dirk,

I would like to share with you that its fine with me if you address me with Adnan or Muhammad, no problem at all. I have checked the data shared by you and have found out that you are doing it right. Set the path and then call loadExternalFonts method. I have generated the image by using the code below and I have attached the related fonts that I have installed on my end, for your kind reference.

String[] _fontDir = new String[] { "D:\\test folder" };
FontsLoader.loadExternalFonts(_fontDir);
Presentation pptDoc = new Presentation("D:\\Test.pptx");
ISlide pageSlide = null;
for (int i = 0; i < pptDoc.getSlides().size(); i++) {
pageSlide = pptDoc.getSlides().get_Item(i);
BufferedImage bufferedImage = pageSlide.getThumbnail(1.5f, 1.5f);
ImageIO.write(bufferedImage, "jpeg", new FileOutputStream("D:\\Test-" + (i + 1) + ".jpg"));
}


I hope this will be helpful. Please share if I may help you further in this regard.

Best Regards,

Hello Muhammad,


seems like the problem is one of the fonts. When using your font, all is fine.
Can you please check what is wrong with my fonts. See Attachment.

Kind Regards,
Dirk Münker

Hi Dirk,


We are glad to know that you are not facing the issue after using shared fonts. I have observed the data shared by you and have found out that some fonts are installed on your system while some of them are missing. For example, Calibri, Courier New, Times New Roman, Verdana etc. Whereas, these fonts exist in the folder shared by me earlier. Please try installing fonts on your system to avoid such issues.

Best Regards,

Hi Dirk,





We are facing some issues while .pps to .pdf conversion due to default fonts on our environment, we would like to know information about Custom fonts file for trying to load fonts externally.









Thanks & Regards,



Ashwini

Hi Ashwini,


Thank you for posting.

I have observed your comments and like to request you to please make a separate post while explaining your issue along with source file and generated output file so that we may investigate it further to help you out.

Best Regards,