Hello everyone,
I’m facing an issue with PDF generation in Xojo Desktop and was hoping to get some help from the community.
The Problem
I used to generate PDF invoices by printing from a report to a system-installed PDF printer. This method worked great because the generated PDFs included the fonts. I know this because the files displayed correctly on systems without those fonts installed.
Now, I’m using the PDFDocument class in Xojo to create the PDFs. On my machine, where the fonts are installed, everything looks fine. However, when I open the PDFs on a different computer without the specific fonts, the text is replaced by generic fonts. It seems the PDFDocument class isn’t embedding the fonts.
My Questions
- How can I make the PDFDocument class embed fonts? I’ve checked the documentation but haven’t found a clear property or method to do this.
- Is it possible to render the text as a canvas or graphic? This would be a workaround if embedding fonts isn’t an option. The idea is to draw the text as a vector graphic instead of editable text, ensuring its appearance doesn’t change.
Any advice, suggestions, or code examples would be greatly appreciated. Thanks!