protected function addTokenToPage(\Zend_Pdf_Page $page, $tokenId)
    {
        // Set $this->pageFont to false to prevent drawing of tokens on page.
        if ($this->pageFont) {
            $font = \Zend_Pdf_Font::fontWithName($this->pageFont);

            if ($this->pageXfromLeft) {
                $x = $this->pageX;
            } else {
                $x = $page->getWidth() - $this->pageX;
            }
            if ($this->pageYfromTop) {
                $y = $page->getHeight() - $this->pageY;
            } else {
                $y = $this->pageY;
            }

            $page->setFont($font, $this->pageFontSize);
            $page->drawText(strtoupper($tokenId), $x, $y, 'UTF-8');
        }
    }
protected function addTokenToPage(\Zend_Pdf_Page $page, $tokenId)
    {
        // Set $this->pageFont to false to prevent drawing of tokens on page.
        if ($this->pageFont) {
            $font = \Zend_Pdf_Font::fontWithName($this->pageFont);

            if ($this->pageXfromLeft) {
                $x = $this->pageX;
            } else {
                $x = $page->getWidth() - $this->pageX;
            }
            if ($this->pageYfromTop) {
                $y = $page->getHeight() - $this->pageY;
            } else {
                $y = $this->pageY;
            }

            $page->setFont($font, $this->pageFontSize);
            $page->drawText(strtoupper($tokenId), $x, $y, 'UTF-8');
        }
    }
protected function addTokenToPage ( \ Zend_Pdf_Page $ page , $ tokenId ) { // Set $this->pageFont to false to prevent drawing of tokens on page. if ( $ this -> pageFont ) { $ font = \ Zend_Pdf_Font :: fontWithName ( $ this -> pageFont ) ; if ( $ this -> pageXfromLeft ) { $ x = $ this -> pageX ; } else { $ x = $ page -> getWidth ( ) - $ this -> pageX ; } if ( $ this -> pageYfromTop ) { $ y = $ page -> getHeight ( ) - $ this -> pageY ; } else { $ y = $ this -> pageY ; } $ page -> setFont ( $ font , $ this -> pageFontSize ) ; $ page -> drawText ( strtoupper ( $ tokenId ) , $ x , $ y , 'UTF-8' ) ; } }
Add the token to a pdf page

@param \Zend_Pdf_Page $page
@param string $tokenId
Add the token to a pdf page