Hello,
I´m using Zend_pdf to load pdf files and modify them in order to add some
text.
For this reason I followed your tutorial to extract the font from this
existing pdf to write the new text in the right font:
...
$font = $this->extractFont($fontName);
$page->setFont($extFont, $fontSize);
$page->drawText($line, $posx, $posy, "UTF-8');
...
When I use this code with standard fonts from Zend_Pdf there is no problem.
But as soon as I use the extracted font, I get the following err message:
Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Fonf
encoding is not supported' in
D:\Server\xampp\php\PEAR\Zend\Pdf\Resource\Font\Extracted.php:242 Stack
trace: #0 D:\Server\xampp\php\PEAR\Zend\Pdf\Page.php(1428):
Zend_Pdf_Resource_Font_Extracted->encodeString('Hallo Welt!', '') #1
D:\Server\xampp\htdocs\PrintPortal\PDFTemplate.php(195):
Zend_Pdf_Page->drawText('Hallo Welt!', 323, 464.61417) #2
D:\Server\xampp\htdocs\PrintPortal\PDFTemplate.php(103):
PDFTemplate->drawTextBox(Object(DrawingRectText)) #3
D:\Server\xampp\htdocs\PrintPortal\test.php(17): PDFTemplate->addContent()
#4 {main} thrown in
D:\Server\xampp\php\PEAR\Zend\Pdf\Resource\Font\Extracted.php on line 242
The font name currently using is EurostileRegular. When I use extractFonts()
and let a foreach print the font names I get this font name (using
Zend_Pdf_Font::NAME_POSTSCRIPT). So I think it is no problem to find it
within the pdf.
What is the matter with it?
regards
Stefan
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/Zend-PDF-Fond-encoding-is-not-supported-tp3037563p3037563.html
Sent from the Zend Framework mailing list archive at Nabble.com.