Issue Type: Bug Created: 2009-10-17T02:46:00.000+0000 Last Updated: 2011-06-04T00:19:35.000+0000 Status: Open Fix version(s): - Next Major Release ()
Reporter: Andrei Iarus (poni1111) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Pdf
Related issues: Attachments:
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).
Posted by Andrei Iarus (poni1111) on 2009-10-17T11:58:32.000+0000
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 );
$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);
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.
Posted by Jannik Z (apfelbox) on 2011-06-01T17:48:08.000+0000
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.
Have you found an issue?
See the Overview section for more details.