Hi All,

Given we have 800 people here, maybe it's time for an on-topic
question.

I'm using the PDF library from the Zend framework, version 1.11.0. For
certain fonts, when creating a PDF and using these fonts, Zend fails
to do so properly. So the result is simply a bad PDF.

Here a very simple file:

  set_include_path ('ZendFramework-1.11.0-minimal/library');
  require_once 'Zend/Loader/Autoloader.php';
  $loader = Zend_Loader_Autoloader::getInstance();

  $pdf = new Zend_Pdf();

  $pdf->pages[] = $pdf->newPage('289:189:');

  $font = Zend_Pdf_Font::fontWithPath('ColabThi-webfont.ttf');
  $pdf->pages[0]->setFont($font, 35);
  $pdf->pages[0]->drawText('TestLogo', 22, 120);

  $pdf->save('result.pdf');


This ttf file is not handled properly by Zend. The ttf is correct as
other tools can create a PDF and embed it just fine.

I've put up an example here:

  http://www.berenddeboer.net/zend_pdf/result_colaborate_thin.pdf

And a correct page looks like this:

  http://www.berenddeboer.net/zend_pdf/correct_result.pdf


Anyone has seen this before? It appears to happen with type
"TrueType", not with type "CID TrueType" fonts.


Someone else reported something similar:

  
http://zendframework.com/issues/browse/ZF-9908?page=com.atlassian.jira.plugin.ext.subversion%3Asubversion-commits-tabpanel


I like to avoid debugging the Zend framework if I can. Recommendations for
other PDF creation frameworks welcome.

-- 
All the best,

Berend de Boer

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to