original_string: 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');
      }
code: 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');
      }
code_tokens: 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' ) ; }
docstring: Reads the survey pdf belonging to this token, puts the token id
  on de pages and outputs the result.
  
  @param string $tokenId
docstring_tokens: Reads the survey pdf belonging to this token puts the token id on de pages and outputs the result .