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

Free Support Forum - aspose.com

PPTX to PDF Conversion Does Not Create Correct Encoding for Calibri Font

Text with calibri font in pptx gets encoding of Identity-H instead of ANSI.
If pptx saved as pdf in PowerPoint the encoding is correct. Also calibri font has correct encoding when word doc converted to pdf using Aspose.Words. Using version 21.10 for both slides and word with Java

@galinal321,
Thank you for contacting support.

Please check if the Calibri font has been installed on the operating system where you faced the issue. If the font is not there, please install it or use FontsLoader class to load the font as external as shown below:

String[] folders = new String[] { fontFolder1, fontFolder2 };
FontsLoader.loadExternalFonts(folders);

Documents: Custom Font
API Reference: FontsLoader Class

If the issue persists, please share the following data:

  • input PPTX file and output PDF
  • code example that reproduces the problem
  • OS version where the problem occurs
  • JDK version

It would be great if you could check the problem using the latest version of Aspose.Slides for Java first if it is possible.

PPT Conversion.zip (55.6 KB)
Calibri is default font for PowerPoint and word. It installed on the system. Word conversion by Aspose is working as expected unlike PowerPoint. Pdf text in Calibri font is not displayed when we use pdf converted from pptx by Aspose with pdfbox for highlighting.
Attached are pptx and pdf.
jdk 1.8

ByteArrayInputStream bais = new ByteArrayInputStream(pptBytes)
Presentation doc = new Presentation(bais);	
PdfOptions saveOptions = new PdfOptions();
saveOptions.setWarningCallback(warningCallback);			
doc.save(fileLocation + filename , SaveFormat.Pdf,saveOptions);

Thank you

@galinal321,
Thank you for the additional data. Could you please describe in more detail how can I test the problem you described in the first post of this forum thread? Please also specify the version of the operating system on which this code was run.

If you open created pdf in acrobat and check document properties fonts tab you can see fonts encoding.

Attached is same pptx saved as pdf directly in PowerPoint. The font encoding is ANSI and recognized by pdfbox.
gl_test_pptx_office.pdf (96.7 KB)

OS: Windows 10 version:1909

Thank you for your time.

@galinal321,
Thank you for the additional information. We will reply to you as soon as possible.

@galinal321,
I’ve reproduced the problem with encoding for Calibri font and added a ticket with ID SLIDESJAVA-38749 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate this case. You will be notified when the issue is resolved.

Hello,
Any updates on this issue? Are you planning to have a solution included into next release?

Thank you

@galinal321,
I’ve requested plans on this issue from our development team. We we let you know as soon as possible.

@galinal321,
An issue investigation has been scheduled for the week 2022/14. After finding out the cause, we will be able to say how soon it will be resolved.

Thank you for the update.
It seems other TrueType fonts are affected and the issue exists on windows and linux server.
Is week 2022/14 beginning of April?

Thank you

@galinal321,

Thank you for the note. I’ve passed this information to our developers, we will also check it.

Yes, you are right.

Hello,
Any updates?
Pdf converted from ppt by Aspose does not work with pdfbox so we might need to switch to different software if issue cannot be resolved.

Thank you

@galinal321,
As far as I can see, the issue has already been resolved. A fix will be included in Aspose.Slides 22.5. This release will be published in the second half of May.

The issues you have found earlier (filed as SLIDESJAVA-38749) have been fixed in Aspose.Slides for Java 22.5 (ZIP).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.