ZF-5133: Zend_PDF::fontWithPath happens exception on i5/OS

Issue Type: Bug Created: 2008-12-01T22:07:38.000+0000 Last Updated: 2012-11-20T20:52:29.000+0000 Status: Closed Fix version(s): Reporter: old of Satoru Yoshida ( Assignee: None Tags: - Zend_Pdf

Related issues: - ZF-3843

Attachments: -


I find Zend_PDF::fontWithPath happens exception on i5/OS if I use TrueType font file that has Japanese in font name property.

I think getFontName() of Zend/Pdf/Resource/Font.php has some problem.


Posted by old of Satoru Yoshida ( on 2008-12-01T22:12:39.000+0000

Probably, I think this issue depends on not supported encoding on iconv.

Posted by old of Satoru Yoshida ( on 2009-05-25T21:44:54.000+0000

code sample

<pre class="highlight">
$pdf = new Zend_Pdf();
$font = Zend_Pdf_Font::fontWithPath('/usr/local/zftest/ipafont/ipagp.otf');


<pre class="highlight">
#0 /usr/local/Zend/ZendFramework/library/Zend/Pdf/Resource/Font/CidFont.php(119): Zend_Pdf_Element_Name->__construct('?I?P?A?P?G?o?t?...')
#1 /usr/local/Zend/ZendFramework/library/Zend/Pdf/Resource/Font/CidFont/TrueType.php(57): Zend_Pdf_Resource_Font_CidFont->__construct(Object(Zend_Pdf_FileParser_Font_OpenType_TrueType), 0)
#2 /usr/local/Zend/ZendFramework/library/Zend/Pdf/Font.php(752): Zend_Pdf_Resource_Font_CidFont_TrueType->__construct(Object(Zend_Pdf_FileParser_Font_OpenType_TrueType), 0)
#3 /usr/local/Zend/ZendFramework/library/Zend/Pdf/Font.php(686): Zend_Pdf_Font::_extractTrueTypeFont(Object(Zend_Pdf_FileParserDataSource_File), 0)
#4 /usr/local/zftest/application/default/controllers/PdfController.php(22): Zend_Pdf_Font::fontWithPath('/usr/local/zfte...')
#5 /usr/local/Zend/ZendFramework/library/Zend/Controller/Action.php(512): PdfController->outputAction()
#6 /usr/local/Zend/ZendFramework/library/Zend/Controller/Dispatcher/Standard.php(288): Zend_Controller_Action->dispatch('outputAction')
#7 /usr/local/Zend/ZendFramework/library/Zend/Controller/Front.php(945): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#8 /usr/local/zftest/application/bootstrap.php(19): Zend_Controller_Front->dispatch()
#9 /usr/local/zftest/public/index.php(8): require('/usr/local/zfte...')
#10 {main}

Posted by old of Satoru Yoshida ( on 2009-05-25T21:47:03.000+0000

Zip of the OTF file.

Posted by old of Satoru Yoshida ( on 2009-06-29T00:40:22.000+0000

The problem may be specific to AIX and i5/OS.

Font name would be converted by mistake if the font name contains multibyte characters. Because you can not use UTF-16BE encoding with the AIX and i5/OS.

Posted by Satoru Yoshida (satoruyoshida) on 2009-09-17T22:56:10.000+0000

I find TCPDF library (from <>) can work fine with Zend Core for i5/OS 2.0.1 . :-)

So I change the Priority from Major to Trivial.

Posted by Rob Allen (rob) on 2012-11-20T20:52:29.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.