|
|
@@ -222,7 +222,7 @@ public function drawEllipse($x1,
|
|
|
<para>
|
|
|
Text drawing operations also exist in the context of a <acronym>PDF</acronym> page. You
|
|
|
can draw a single line of text at any position on the page by supplying the x and y
|
|
|
- coordinates of the baseline. Current font and current font size are used for text
|
|
|
+ coordinates of the baseline. Current font, font size and page fill color are used for text
|
|
|
drawing operations (see detailed description below).
|
|
|
</para>
|
|
|
|
|
|
@@ -251,6 +251,18 @@ $pdfPage->drawText('Hello world!', 72, 720);
|
|
|
]]></programlisting>
|
|
|
</example>
|
|
|
|
|
|
+ <example id="zend.pdf.drawing.text-drawing.example-2">
|
|
|
+ <title>Set font color</title>
|
|
|
+
|
|
|
+ <programlisting language="php"><![CDATA[
|
|
|
+...
|
|
|
+$pdfPage->setFillColor(Zend_Pdf_Color_Html::color('#990000'))
|
|
|
+ ->drawText('Hello world (in red)!', 72, 720);
|
|
|
+....
|
|
|
+]]></programlisting>
|
|
|
+ </example>
|
|
|
+
|
|
|
+
|
|
|
<para>
|
|
|
By default, text strings are interpreted using the character encoding method of the
|
|
|
current locale. if you have a string that uses a different encoding method (such as a
|
|
|
@@ -262,7 +274,7 @@ $pdfPage->drawText('Hello world!', 72, 720);
|
|
|
function:
|
|
|
</para>
|
|
|
|
|
|
- <example id="zend.pdf.drawing.text-drawing.example-2">
|
|
|
+ <example id="zend.pdf.drawing.text-drawing.example-3">
|
|
|
<title>Draw a UTF-8-encoded string on the page</title>
|
|
|
|
|
|
<programlisting language="php"><![CDATA[
|