Hi,
I am rendering presentation (pptx) as PDF. But I am seeing incorrect fonts in the generated pdf.
Please tell me some way by which we can tell Aspose what fonts to substitute as well as how we can point it to the custom fonts folder so
that it doesn’t read the Fonts from the OS.
From the information I got from Aspose forum, it appears that Aspose Slides behave differently than Aspose Words since Slides appears to allow JRE to handle the fonts where as Words looks to OS or custom folders.
Is there any way to make Slides behave like Words in this custom fonts handling matter?
Do we have any mechanism to get the information about missing fonts and how Aspose is mapping some of these fonts.
Looking forward for your reply.
Thanks
Praneeth
Hi Praneeth,
I have observed your comments regarding fonts implementation and like to share that Aspose.Slides and Aspose.Words are two separate products with different class structures. One can not really compare the two different products. However, good news is that we are going to offer font replacement mechanism in upcoming Aspose.Slides for Java 15.1.0 that will involve explicit font replacement as well as rule based fonts replacement. You may please visit this documentation link to get an idea of implementation and supported feature.
Aspose.Slides also offer to load the fonts from custom location without even installing them. Please visit this documentation link to serve the purpose on your end.
Unfortunately, there is no mechanism for identifying missing fonts. You can use standard java libraries to look for installed fonts list. You can check in your presentation that which of fonts have been used and can then identify that what fonts are missing in the operating system that have actually been used in presentation.
I hope this will be helpful. Please share, if I may help you further in this regard.
Many Thanks,
Hi,
Thanks for looking in to this. Please tell us when we can expect Aspose.Slides Java 15.1.0 release? Please provide some idea about this future release.
Thanks
Praneeth
Hi Praneeth,
Aspose.Slides for Java 15.1.0 will be released by end of this week or early next week.
Many Thanks,
Hi,
I am facing an issue in converting a pptx file to pdf. The Pdf file does not contain correct fonts.
I tried loading fonts from external directory using FontsLoader.loadExternalFonts API but it didn’t work. I also tried setting defaultRegularFont but it also didn’t work.
Both the pptx and pdf files look different.
I also tried font replacement API which is available in the latest Aspose version (Aspose Slides Java 15.1.0). But I am unable to understand which font can replace the fonts present in the pptx file.
We are running code at linux machine.
The machine details are given below:
Oracle Linux 5 (Intel 64-bit, Developer)
OS: Oracle Linux Server release 5.8
Architecture: x86_64
RAM Details:
total used free shared buffers cached
Mem: 15600 10397 5202 0 778 5612
-/+ buffers/cache: 4007 11592
Swap: 10047 60 9986
Please help me in resolving the issue.
I am attaching the sample power point presentation and pdf file with this post
The list of fonts available at linux box is also attached with this post.
Thanks
Praneeth
Hi Paraneeth,
I have observed the presentation and PDF file shared by you. You are using Calibri font in your presentation. Actually, some of JDK has issue while measuring and rendering of Calibri font.
please visit the following links for reference:
http://stackoverflow.com/questions/16331075/error-generating-jasperreport-in-development-mode
https://forums.oracle.com/forums/thread.jspa?messageID=11012777
The Calibri font bug exists in JDK 1.6_13, JDK 1.6_35, JDK 1.6_45 and JDK 1.7_21.
There is no issue in JDK 1.6_31, JDK 1.6_38, JDK 1.6_39, JDK 1.6_41, JDK 1.6_43, JDK 1.7_17, JDK 1.7_25. I suggest you to please try using one of suggested JDK versions on your end. If there is still an issue then please feel free to share with us.
Many Thanks,
Hi,
We have upgraded our java version to JDK 1.7.0_72. We are still seeing issues in rendering Calbri font for the presentation shared with this post.
I am also sharing the resulting Pdf file and the list of font substitution messages generated.
You can see both the presentation file and pdf file look different.
Thanks
Praneeth
Hi Praneeth,
I have compared the the PDF and presentation files side by side. I have not been able to observe the font difference between them. I request you to please share the snapshot highlighting the font difference along with slide references so that I may observe the issue and add that in our issue tracking system.
Many Thanks,
Hi,
Attached pptx and pdf look different from fonts perspective. We can clearly see that both uses different fonts and hence they look different.
Content is same but the font used to render the content is different. We want pptx and pdf to look same in both perspective, content and fonts both.
In older post, Aspose replied that there are some buggy JDK versions which have some issues in rendering calibri font and our sample presentation uses Calibri font. Hence, Aspose suggested to use some other version of JDK.
Now we are using JDK 1.7.0_72 but still seeing same issues.
For your reference, I am attaching a screenshot of second slide where difference is highlighted and these differences are not only limited to this slide. We have such differences at many places.
Please let me know how this can be resolved.
Thanks
Praneeth
Hi Praneeth,
I have observed the sample presentation, Pdf file and image shared by you and have been able to observe the issue specified. An issue with ID SLIDESJAVA-34797 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.
We are sorry for your inconvenience,
I am running into the same problem. I’m trying to save a presentation as a PDF file, but the custom font (“Calisto MT”) is changed into something else!
Has there been any progress on this issue?
Hi Marco,
Thanks for your interest in Aspose.Slides.
I have observed the requirement shared by you and suggest you to please share the presentation file, generated output and used sample code with us by creating a new thread. Your issue may apparently seem the same as discussed in this thread but internally it can have different reasoning for the issue.
Many Thanks,
Hi Praneeth,
Our product team has investigated the issue on their end. First of all in the shared PDF hello3.pdf, the rendering has been done using Albany WTJ font and not Arial.
You can set any defaultRegularFont or load fonts with FontsLoader.loadExternalFonts.But in order to achieve the goal of same fonts look and perspective for PPTX and PDF, it is necessary to install Calibri font in your OS or use FontsLoader.loadExternalFonts(new String[]{path}) where path contains Calibri font.
I hope after this change the things will work. Please share your kind feedback in this regard.
Many Thanks,