/** * Outputs the content of a table in PDF format * * @todo user-defined page orientation, paper size * @param string the database name * @param string the table name * @param string the end of line sequence * @param string the url to go back in case of error * @param string SQL query for obtaining data * * @return bool Whether it suceeded * * @access public */ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { global $what; global $pdf_report_title; $pdf = new PMA_PDF('L', 'pt', 'A3'); $pdf->AddFont('DejaVuSans', '', 'dejavusans.php'); $pdf->AddFont('DejaVuSans', 'B', 'dejavusans-bold.php'); $pdf->AddFont('DejaVuSerif', '', 'dejavuserif.php'); $pdf->AddFont('DejaVuSerif', 'B', 'dejavuserif-bold.php'); $pdf->SetFont(PMA_PDF_FONT, '', 11.5); $pdf->AliasNbPages(); $attr = array('titleFontSize' => 18, 'titleText' => $pdf_report_title); $pdf->mysql_report($sql_query, $attr); // instead of $pdf->Output(): if ($pdf->state < 3) { $pdf->Close(); } if (!PMA_exportOutputHandler($pdf->buffer)) { return FALSE; } return TRUE; }