ZF-8083: Font doesn't get embedded (Acrobat Reader complains)

Description

It seems, that when using an external font (the name of the font is DejaVuSansMono ), it doesn't get embedded. I tried ALL POSSIBILITIES:

$font = Zend_Pdf_Font::fontWithPath($ttfFolder . $ttfFile); //this alone should include the font OR $font = Zend_Pdf_Font::fontWithPath($ttfFolder . $ttfFile, Zend_Pdf_Font::EMBED_DONT_COMPRESS); OR ALL the other possibilities.

The framework doesn't complain about the fact that the font cannot be embeded (any way, it is a free font that can be freely downloaded).

At least Acrobat Reader complains about it. The Reader's message is: "Cannot find or create the font 'DejaVuSansMono'. Some characters may not display or print correctly.". To notice is also that, when looking at the fonts used in the PDF, the font is shown, but in the "Actual Font" field, value "Uknown" is displayed. The type of the font is: TrueType (CID), and the Encoding: Identity-H (displayed also in the Reader).

Comments

Forgot to add something VERY IMPORTANT: The PDF file is created using an existing file so:

$pdf = new Zend_Pdf( 'PATH_TO_MY_FILE', null, true ); $page = $pdf->pages[] = new Zend_Pdf_Page( $pdf->pages[0] );

$font = Zend_Pdf_Font::fontWithPath($ttfFolder . $ttfFile, Zend_Pdf_Font::EMBED_DONT_EMBED);

$style = new Zend_Pdf_Style(); $style->setFillColor(new Zend_Pdf_Color_Rgb(0.9, 0, 0)); $style->setFont($font, 9.95);

$page->setStyle($style); //....

The problem in this case would be one of 2: 1. the used PDF file prevents ZF_PDF to include the file. In this case, an exception should be thrown (as it is implemented for copyrighted fonts) 2. there is a problem to embed the font, which should be repaired.

Same problem here. All fonts embedded in a PDF always turn up like this: http://img683.imageshack.us/img683/7388/…

If I try add embed Arial Black, then just nothing is shown, when writing text in the pdf. Another font is really bad composed.