Hi Ryan,
Thanks for your inquiry. I have converted your PDF to PDFA on Linux and unable to notice the reported issue. As per PDFA standards the fonts should be embedded in PDFA file and It seems Aspose.Pdf for Java is unable to find fonts on your system. Please note on non-Windows OSs Aspose.Pdf for Java looks fonts in system default font path or specified local font path for custom font directory.
Please note most of the PDF documents that we convert are created by people using Windows or Mac OS operating systems with fonts that are installed with Microsoft Windows or with Microsoft Office. To resolve your issue either you can install Microsoft fonts on your system or copy fonts from your windows OS and paste to your system default font path.
Furthermore, if you want to use custom fonts from other than system default font path then you need to add that folder path into LocalFontPath as following. You can use following methods to get system folder of fonts or set font path to font folders.
- Document.getLocalFontPath () - shows the system folder in which project will look for fonts.
- Document.setLocalFontPath (String) - Setting font path to custom folder
// Set font folder path
String path = "/home/tilal/fonts/";
// Adding a single font directory
// com.aspose.pdf.Document.addLocalFontPath(path);
// Setting the user list for standard font directories
java.util.List list = com.aspose.pdf.Document.getLocalFontPaths();
list.add(path);
com.aspose.pdf.Document.setLocalFontPaths(list);
// ...
// ...
We are sorry for the inconvenience caused.
Best Regards,
I set up the fonts in the Linux and it works.
Hi Ryan,
Hello Ryan,
I’m facing the exact same issue as yours. I read the solution given here but I’m not able to understand completely how to implement it.
Can you please help me out in this?
Thanks,
Ankit
Thanks for posting your inquiry.
As shared earlier in this thread, PDF to PDF/A conversion requires all necessary fonts installed in your system. In case required font is not installed in your system, you may use document.setLocalFontPath(string)
method, in order to set path to the directory where required font is located.
In case you still experience any issue, please share your input document along with sample code snippet and environment details (i.e JDK version, OS, etc.). We will test the scenario in our environment and address it accordingly.