How to retain font size

while converting pptx to pdf font size is increasing, Is there a way to retain font size as in pptx.


Thanks
Arpit

Hi Arpit,

I have observed the issue shared by you and request you to please share the sample presentation along with generated PDF file with us. Please also share the Operating System and Java details with us as well for further investigation. We will investigate the issue further on our end to help you out.

Many Thanks,

I have the similar issue here. The PDF generated has large font size. Is there any solutions?

Hi,

I have observed the issue shared by you and request you to please share
the sample presentation along with generated PDF file with us. Please
also share the Operating System and Java details with us as well for
further investigation. We will investigate the issue further on our end
to help you out.

Many Thanks,

Hi,


Attached the ppt and pdf for your reference.
The environment is JDK 1.7 and Linux.

Hi,


I have observed the font difference on slide 1 of presentation in PDF. I suggest you to please try using Aspose.Slides for Java 8.4.0 on your end. The issue seems to be of missing fonts in your installation. In order to get the correct rendering, you need to install the Arial font that is used in heading of your presentation in your machine. All fonts used in your presentation must be available in your operating system for correct rendering. You can also try loading the fonts externally without installing them in your operating system using following sample code.

FontsLoader.loadExternalFonts(new String[]{fontpath});
PresentationEx pres=new PresentationEx(“test.pptx”);
pres.save(“test.pdf”,SaveFormat.Pdf);

Please share, if I may help you further in this regard.

Many Thanks,

Hi Mudassir,


I tried to generate the pdf in my mac machine, and there are Arial font in my computer.
I also tried to specify the font path, but the result is the same.
I have tried 8.4 before with the same issue, so that I upgrade to 8.5 to have a trial.

It seems to me that the font in PDF is Arial already, but the font size does not align with the ppt.

Could you help to investigate?

Hi,


Yes, you may please try using Aspose.Slides for Java 8.5.0 on your end. Please also share the Java version used on your end along with Operating system details. I will investigate it further on my end to help you out.

Many Thanks,

Hi Mudassir,


java version "1.7.0_45"

Java(TM) SE Runtime Environment (build 1.7.0_45-b18)

Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)


OS: Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64

Hi,

I have worked with your presentation in MAC environment. Actually, the issue is that the font used in your presentation is missing in your MAC environment. For this reason, when you export presentation to PDF the different default font is rendered. I have used the following sample code on my end by copying and loading the Fonts externally. The PDF is rendered fine after this. Please try using the attached fonts with following sample code. For your kind reference, I have also attached the generated PDF as well.

String path="/Users/mudassir_controlled/Documents/Aspose/";
String FontPath=path+"Fonts/";
FontsLoader.loadExternalFonts(new String[]{FontPath});
PresentationEx(path+"report.pptx");
pres.save(path+"report.pptx.pdf",SaveFormat.Pdf);

Please share, if I may help you further in this regard.

Many Thanks,

Hi Mudassir,


Thank you very much for your kind support.
I cannot find any font from the attachment, and could you tell me what is the font actually used in the PPT? I just choose Arial in the ppt.

Hi Arpit,


I have attached the fonts in Fonts.rar in my previous post. Please observe the generated PDF as well for your kind reference,

Many Thanks,

Is it able to load the fonts from classpath, such that the application can be self contained?

Hi Mudassir,


I still cannot produce a correct font size using your font.

Hi Arpit,

I like to share that the output that I have shared with you has been achieved by using the same fonts that I have shared along with the sample code. It may be some other issue incurring then as the issue is not related to Aspose.Slides for Java. Can you please share the MAC version along with JDK 1.7 version used on your end. I also suggest you to please try using Aspose.Slides for Java for generating output in some other machine as well.

Many Thanks,

Hi Mudassir,


My Mac is Darwin Kernel Version 13.2.0: Thu Apr 17 23:03:13 PDT 2014; root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64

Actually, I tried to program in our testing server, which is a linux machine, and the outlook is exactly the same as generated in my local machine.

Hi Raymond,

I have observed the comments shared by you. Can you please confirm again that in which environment you are getting issue. I shared the results of MAC 10.6 on my end with you and you can see they are all good by using the share sample code and fonts. Are you having issue in Linux environment as you have shared that you have tested in Linux machine.

I again suggest you to please try using the sample code given in this post by creating a console application from scratch and using Fonts.rar. Please make sure about the path of font directory that you are using in your sample code must conform with actual font directory path. You can try the tests in Linux and MAC environments. I tested in MAC and Windows 7 without any issue using Aspose.Slides for Java 8.5.0 and JDK 1.6.

Please share, if I may help you further in this regard.

Many Thanks,