Overview
I am generating a four page PDF document in an iPad application that uses a custom font, Trade Gothic. It is embedding correctly into the application, and looks great.
However, part of the app is to email the PDF as a leave behind. This sent file displays all font as a default sans type and on a few systems, I received the error Cannot find or create the font 'RVYPRT+TradeGothicLTStd-Light'. Some characters may not display or print correctly.
I am generating the PDF using the UIKit Framework. Here is a tutorial that uses the same process: http://www.ioslearner.com/generate-pdf-programmatically-iphoneipad/
My Question
How do I embed the font into the PDF output so that it is rendered correctly as the custom font rather than default type after it is sent.
Thanks in advance!
Update 1: Similar unanswered questions I have found
Update 2: More Information on fonts
The font, http://store1.adobe.com/cfusion/store/html/index.cfm?store=OLS-US&event=displayFont&code=TRDQ10003000, is an OpenType Font and does allow embedding by the license.
Also, the default font used is standard.
If certain fonts are missing from the PDF file, Adobe Acrobat and Adobe Reader will automatically try to emulate the missing font by using one of the Multiple Master fonts that are built into these programs. This way, the document will not be represented exactly as the designer wanted it to, but at least the text won’t reflow. The Multiple Master fonts that are used for this are: Adobe Serif MM and Adobe Sans MM
source: http://www.prepressure.com/pdf/basics/fonts
Update 3: Fonts are referenced in the PDF, but not embedded
It appears that the app is attempting to embed the fonts but they are not being embedded correctly. Here is a screenshot of the embedded fonts under File -> Document Properties:
The first problem that I see is that the font is being listed as Type 1, when it is actually an OpenType font. And as expected, the "Actual Font" is Sans MM (the font used when an embedded font is not found.)
Update 4: In another PDF (generated using Adobe, not iPad application) the fonts that are needed are embedded as subsets. I am not sure, but this leads me to believe that it should be possible to do the same thing programmatically.
Isn't it possible to change the embedded font to another that allows embedding?
The font you are using and which is 'looking great', TradeGothic, does not allow embedding into PDF (or other) documents, according to its license.
(Why a font designer would want to do that is beyond my little brain. After all they sold a license to use it for documents, no? -- And why [as I've experienced first-hand recently] a big corporation would design their Corporate Identity around one such font, but then being 'too cheap' and buying only font licenses which don't allow embedding, hence forcing their employees to send out crappy PDFs to their customers adds only more madness to this story...)
As can be seen from your second update, you have discovered that fact already.
What you seem to misunderstand is the 'Document Properties' screenshot:
Those PDF-receiving systems which give that warning about "Can not find or create the font 'RVYPRT+TradeGothicLTStd-Light'. Some characters may not display or print correctly" are not at fault. They simply...
My simple advice, repeated hundreds of times in front of my customers over the years:
Update:
Basically, the "embedding flag" can express be four (important) different levels of restrictions. (In practical terms, this flag applies to TrueType and OpenTypes only, not to the more old-fashioned PostScript Type1 fonts. Technically speaking: the name of this flag is fsType, it is a bitmask, and it is contained in the OS/2 table of TrueType and OpenType fonts....)
These levels specify where and when and for which purpose the type foundry allows embedding of the font in documents (not only PDF but also Word, OpenOffice or any other document type:
You can create an electronic document on the system which has the font installed, you can edit it and you can view it. Ah, you can also print it: Adobe PostScript printer drivers will include all font elements required for printing in the PostScript file. But that's it.
Document have the font embedded and document can be viewed with the original font (even on a document-receiving system). But you can't do much else with it (no document editing, for example).It makes the whole document read-only + print-only. Copy and paste of content into another document is possible, but it will NOT use (or even transfer) the restricted font.
The document can be edited (on a receiving system). However, the exact success of this operation depends on whether the full font or a subset was embedded. If your subset by accident doesn't contain an 'i', you can't add a comment 'idiots!' to the document, and you may need to restrict yourself to 'fools!'....
No restrictions here. The embedded font can even be extracted and installed on the receiving system. (There was a time when Microsoft would automatically install any document-embedded font from a Word document on the recipient machines if it wasn't already there.) Meanwhile however, this option is moot: NO 'usual' application provides means for either extracting or installing embedded document-fonts.
There are two more (less important) restrictions that the 'embedding' flag of a font may indicate:
Adobe software in many cases, when there is no fsType flag at all contained in the font itself, will treat this font as one that allows Print + Preview-only embedding.
Details about this topic may be learned from an Adobe Whitepaper about 'Font Embedding Guidelines for Third-party Developers.