public function echoPdfByTokenId($tokenId)
    {
        $surveyId = $this->db->fetchOne('SELECT gto_id_survey FROM gems__tokens WHERE gto_id_token = ?', $tokenId);

        $pdf  = $this->getSurveyPdf($surveyId);

        $this->addTokenToDocument($pdf, $tokenId, $surveyId);

        foreach ($pdf->pages as $page) {
            $this->addTokenToPage($page, $tokenId);
        }

        $this->echoPdf($pdf, $tokenId . '.pdf');
    }
public function echoPdfByTokenId($tokenId)
    {
        $surveyId = $this->db->fetchOne('SELECT gto_id_survey FROM gems__tokens WHERE gto_id_token = ?', $tokenId);

        $pdf  = $this->getSurveyPdf($surveyId);

        $this->addTokenToDocument($pdf, $tokenId, $surveyId);

        foreach ($pdf->pages as $page) {
            $this->addTokenToPage($page, $tokenId);
        }

        $this->echoPdf($pdf, $tokenId . '.pdf');
    }
public function echoPdfByTokenId ( $ tokenId ) { $ surveyId = $ this -> db -> fetchOne ( 'SELECT gto_id_survey FROM gems__tokens WHERE gto_id_token = ?' , $ tokenId ) ; $ pdf = $ this -> getSurveyPdf ( $ surveyId ) ; $ this -> addTokenToDocument ( $ pdf , $ tokenId , $ surveyId ) ; foreach ( $ pdf -> pages as $ page ) { $ this -> addTokenToPage ( $ page , $ tokenId ) ; } $ this -> echoPdf ( $ pdf , $ tokenId . '.pdf' ) ; }
Reads the survey pdf belonging to this token, puts the token id
on de pages and outputs the result.

@param string $tokenId
Reads the survey pdf belonging to this token puts the token id on de pages and outputs the result .