Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2006-11-17 11:49:30 +0300
committerMichal Čihař <michal@cihar.com>2006-11-17 11:49:30 +0300
commitfb9a3a598ee9b59ace10f5874c62f2cd1c77ccdb (patch)
treeec8b2d44eaef0c2c138d5551976ae1ef6a681d6f /pdf_schema.php
parentf0780e312984f178baba99b54acdf6a2f9fadac9 (diff)
Check before commit!
Diffstat (limited to 'pdf_schema.php')
-rw-r--r--pdf_schema.php43
1 files changed, 13 insertions, 30 deletions
diff --git a/pdf_schema.php b/pdf_schema.php
index 7d95d09f1d..86c27da995 100644
--- a/pdf_schema.php
+++ b/pdf_schema.php
@@ -33,20 +33,12 @@ if (!$cfgRelation['pdfwork']) {
}
/**
- * Gets the "fpdf" libraries and defines the pdf font path, use unicode version for unicode.
+ * Font used in PDF.
+ *
+ * @todo Make this configuratble (at least Sans/Serif).
*/
-define('FPDF_FONTPATH', './libraries/fpdf/font/');
-if ($charset == 'utf-8') {
- define('PMA_PDF_FONT', 'FreeSans');
- require_once('./libraries/fpdf/ufpdf.php');
- class PMA_FPDF extends UFPDF {
- };
-} else {
- define('PMA_PDF_FONT', 'Arial');
- require_once('./libraries/fpdf/fpdf.php');
- class PMA_FPDF extends FPDF {
- };
-}
+define('PMA_PDF_FONT', 'DejaVuSans');
+require_once('./libraries/tcpdf/tcpdf.php');
/**
* Extends the "FPDF" class and prepares the work
@@ -54,7 +46,7 @@ if ($charset == 'utf-8') {
* @access public
* @see FPDF
*/
-class PMA_PDF extends PMA_FPDF {
+class PMA_PDF extends TCPDF {
/**
* Defines private properties
*/
@@ -86,7 +78,7 @@ class PMA_PDF extends PMA_FPDF {
function PMA_PDF($orientation = 'L', $unit = 'mm', $format = 'A4')
{
$this->Alias = array() ;
- $this->FPDF($orientation, $unit, $format);
+ $this->TCPDF($orientation, $unit, $format);
} // end of the "PMA_PDF()" method
function SetAlias($name, $value)
{
@@ -98,7 +90,7 @@ class PMA_PDF extends PMA_FPDF {
$nb = $this->page;
foreach ($this->Alias AS $alias => $value) {
for ($n = 1;$n <= $nb;$n++)
- $this->pages[$n] = $this->_strreplace($alias, $value, $this->pages[$n]);
+ $this->pages[$n]=str_replace($alias, $value, $this->pages[$n]);
}
}
parent::_putpages();
@@ -980,20 +972,11 @@ class PMA_RT {
$pdf->SetAuthor('phpMyAdmin ' . PMA_VERSION);
$pdf->AliasNbPages();
- if ($GLOBALS['charset'] == 'utf-8') {
- // Force FreeSans for utf-8
- $this->ff = 'FreeSans';
- $pdf->AddFont('FreeSans', '', 'FreeSans.php');
- $pdf->AddFont('FreeSans', 'B', 'FreeSansBold.php');
- } elseif ($GLOBALS['charset'] == 'iso-8859-2') {
- // fonts added to phpMyAdmin and considered non-standard by fpdf
- // (Note: those tahoma fonts are iso-8859-2 based)
- $this->ff == 'tahoma';
- $pdf->AddFont('tahoma', '', 'tahoma.php');
- $pdf->AddFont('tahoma', 'B', 'tahomab.php');
- } else {
- $this->ff == 'helvetica';
- }
+ $pdf->AddFont('DejaVuSans', '', 'dejavusans.php');
+ $pdf->AddFont('DejaVuSans', 'B', 'dejavusans-bold.php');
+ $pdf->AddFont('DejaVuSerif', '', 'dejavuserif.php');
+ $pdf->AddFont('DejaVuSerif', 'B', 'dejavuserif-bold.php');
+ $this->ff = PMA_PDF_FONT;
$pdf->SetFont($this->ff, '', 14);
$pdf->SetAutoPageBreak('auto');
// Gets tables on this page