note 17745 added to function.pdf-setcolor

From: Date: Fri, 21 Dec 2001 16:44:25 +0000
Subject: note 17745 added to function.pdf-setcolor
Groups: php.notes 
Request: Send a blank email to php-notes+get-23763@lists.php.net to get a copy of this message
<p>If you encounter errors of the form<br> function 'PDF_setcolor' must not be called in 'path' scope<br> this generally means that you've called the PDFLib functions in the wrong order. For example, the following would be *incorrect* because PDF_rect marks the beginning of the "path scope", and set_color must not be called in path scope: <p>// THIS CODE WILL PRODUCE AN ERROR PDF_rect($pdf,0,0,$width,$height); PDF_setcolor($pdf,$red,$green,$blue); PDF_fill($pdf); <p>The correct order of function calls is as follows: <p>// Correct order of function calls PDF_setcolor($pdf,$red,$green,$blue); PDF_rect($pdf,0,0,$width,$height); PDF_fill($pdf); -- http://www.php.net/manual/en/function.pdf-setcolor.php http://master.php.net/manage/user-notes.php?action=edit+17745 http://master.php.net/manage/user-notes.php?action=delete+17745 http://master.php.net/manage/user-notes.php?action=reject+17745

« previous php.notes (#23763) next »