Details
Description
The PDF docs don't really explain how to set font color. It appears the only way to do it is to create a new Style, and then set the font and color that way, as in:
$style = new Zend_Pdf_Style(); $style->setFillColor(new Zend_Pdf_Color_HTML('#000077')); $style->setFont(Zend_Pdf_font::fontWithName(Zend_pdf_font::FONT_HELVETICA),10); $page->setStyle($style);
It might also be helpful to modify the color section of the manual to explicitly list where color can be used (i.e. within a style object, and not in a page object, etc.)
As with any other PDF drawing operations, text is drawn using the current fill color of the content stream's (page's) graphic state:
Zend_Pdf_Style objects allow you to set multiple attributes of the graphics state at once, but are not required.