My iPhone app creates PDF files (in Arial font). The plain iPhone 3.1.x version works great (other than the known issue that PDF files created on the iPhone can't be viewed correctly in Google Docs or on the BlackBerry).
As I am updating my project for OS 3.2 and the iPad, it works just the same, and the PDF files still look great on the iPhone, iPad and Mac OS X (Preview app). But now on Windows (Vista), Acrobat 9.3.1 says "Cannot extract the embedded font 'XYZABC+ArialMT'. Some characters may not display or print correctly".
And in fact Acrobat then uses some generic font instead of Arial (or whatever other font I try).
Quartz 3.2 seems to generate these "random" embedded font names each time it creates a PDF file (the XYZABC changes around each time). I can't tell whether the problem is just the somewhat strange "temporary" embedded font name with the plus sign, or the way Quartz 3.2 is embedding fonts.
I have tried my existing code (using CGPDFContext*
functions), and also the newly supported UIGraphics*
functions, with the same results.
How can PDF files be created on the iPad to display correctly on Windows?
Important update: as of iOS 4.2, Apple have fixed the bug I reported; PDFs generated from Quartz on iOS now contain correctly embedded fonts. I am leaving the remainder of this answer as-is, but do not use this mechanism on iOS 4.2 or later.
Adobe Reader is correctly, if unhelpfully, following the PDF spec. I have investigated this because it was affecting one of my apps and documented my findings here: http://web.archive.org/web/20180909095127/http://blog.nomzit.com/2010/08/18/annoying-bug-in-quartz-pdfcontext-font-handling/
There is a simple workaround documented there which causes Adobe Reader to behave the same as the more helpful alternatives.
I have also reported the bug to Apple