Increasing Font Size when Converting PPT to PDF Using Aspose.Slides for Java

Hi,

I am converting ppt into pdf file using aspose. Below is the code snippet:

//In below code, outBytes is the ppt in byteArray form (this was also created by using aspose lib).
Powerpoint powerpoint = powerpointFactory.makePowerPoint(outBytes);
Presentation presentation = new Presentation(new ByteArrayInputStream(powerpoint.closeAndGetBytes()));
String filename="output.pdf";
presentation.save(filename, SaveFormat.Pdf);

When I opened this pdf file, I noticed that the size of all the fonts is increased in the pdf file.

How can I make sure while conversion that the font size of the file remains intact? Please suggest.

@nehasatsangi,
Thank you for contacting support.

Please check your results using the latest version of Aspose.Slides for Java if it is possible. If the issue persists, please share the following files and information:

  • the sample presentation file and the output PDF file (you can zip the files and upload an archive here)
  • OS version on which the code was executed
  • JDK version in your app
  • Aspose.Slides version you used

Thanks for your reply.

I tried 22.10 version of aspose.slides and the issue still persists. I can’t use the versions released after 22.10 as the license that we currently hold does not allow us to use versions released after 25th January 2023.

Here are the details that you requested:

  • the sample presentation file and the output PDF file (you can zip the files and upload an archive here) - please find the attachment sample-ppt-n-pdf.zip (850.7 KB)

  • OS version on which the code was executed - Linux 3.10.0-1160.92.1.el7.x86_64

  • JDK version in your app - 1.8

  • Aspose.Slides version you used - 22.10

Note: When I convert the ppt in Windows OS, it gets converted perfectly fine but the font size increases when I do the same with Linux OS. Please suggest.

@nehasatsangi,
Please note that the font in the output PDF is different from the font in the PowerPoint presentation. compare.png (141.8 KB). It looks like the Calibri font was not installed on the OS where the conversion was performed. You should install the font on the OS or load it in runtime before the conversion using FontsLoader class as follows:

FontsLoader.loadExternalFonts(new String[] { MyFonts });

Documents: Custom Font

Thanks Andrey,

We installed the fonts from Windows to Linux OS and it solved the issue.

@nehasatsangi,
We are glad to know that the issue has been resolved on your end. Thank you for using Aspose.Slides.