PDF Font embedding problem in Magento / Zend Framework

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone

Have you ever had problems with custom fonts embedding, while trying to generate PDF ducoments in Magento or using Zend Framework. May be I found solution for you, If you get next error message:

This font cannot be embedded in the PDF document. If you would like to use it anyway, you must pass Zend_Pdf_Font::EMBED_SUPPRESS_EMBED_EXCEPTION in the $options parameter of the font constructor.

As a result of my research I decided, that the problem comes from Zend Framework core and seems, that it doesn’t recognize correctly if your custom font can be embedded if has some embedding permissions.

What I mean, when say embedding permissions:

  • Licensed for print and preview embedding
  • Licensed for editable embedding
  • Licensed for modification

Continue reading “PDF Font embedding problem in Magento / Zend Framework”

Tweet about this on TwitterShare on LinkedInShare on Google+Share on FacebookEmail this to someone