Pregunta

I'm generating a PDF in an iPad app from a nib. The app uses custom fonts which display correctly in the nib in the app. When I view this saved PDF on my Mac, it also displays in the correct font. When I display it in-app with QLPreviewController, the fonts appear to have been replaced. The datasource implements previewController:previewItemAtIndex: which returns the NSURL of the PDF which is in the app's document folder.

Is there anyway to correct this? Do I need to embed the font or provide it to QLPreviewController and, if so, how?

¿Fue útil?

Solución

Probably the fonts are not embedded in the document and this causes the PDF rendering engine to substitute them. Unfortunately with CoreGraphics API you do not have the option to specify whether to embed or not the font in the PDF file.
The Preview app has more capabilities to locate the font files in order to display the file correctly.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top