Search code examples
phpzend-frameworkpdfzend-pdf

How to rotate text while creating PDF in Zend Framework?


I am placing text on pdf something like this using Zend_Pdf:

$page1->drawText( 'Hello World!', 100, 100 );

But now I want to rotate text to 90 degree on pdf. How is it possible ??

Thanks


Solution

  • How about:
    $page->rotate(0, 0, M_PI/12);
    $page->drawText('Hello world!', 100, 100);
    See also: Zend PDF tutorial