Removed experimental PDF export, because the php extensions is to buggy

This commit is contained in:
Andre Lorbach 2008-08-05 11:22:59 +02:00
parent 4505ba1bf3
commit 2aebf307fb
3 changed files with 1 additions and 52 deletions

View File

@ -409,51 +409,6 @@ else
// End first XML Node
$szOutputContent .= "</syslogmessages>";
}
else if ( $content['exportformat'] == EXPORT_PDF )
{
// Set MIME TYPE and File Extension
$szOutputMimeType = "application/pdf";
$szOutputFileExtension = ".pdf";
try
{
// Init PDF Document
$myPdf = new PDFlib();
if ($myPdf->begin_document("", "") == 0) {
die("Error: " . $myPdf->get_errmsg());
}
$myPdf->set_info("Creator", "hello.php");
$myPdf->set_info("Author", "Rainer Schaaf");
$myPdf->set_info("Title", "Hello world (PHP)!");
$myPdf->begin_page_ext(595, 842, "");
$font = $myPdf->load_font("Helvetica-Bold", "winansi", "");
$myPdf->setfont($font, 24.0);
$myPdf->set_text_pos(50, 700);
$myPdf->show("Hello world!");
$myPdf->continue_text("(says PHP)");
$myPdf->end_page_ext("");
$myPdf->end_document("");
// Copy PDF Output
$szOutputContent = $myPdf->get_buffer();
}
catch (PDFlibException $e) {
die("PDFlib exception occurred in hello sample:\n" .
"[" . $e->get_errnum() . "] " . $e->get_apiname() . ": " .
$e->get_errmsg() . "\n");
}
catch (Exception $e) {
die($e);
}
// Delete PDF Object!
$myPdf = 0;
}
// Set needed Header properties
header('Content-type: ' . $szOutputMimeType . "; " . $szOutputCharset);

View File

@ -72,7 +72,6 @@ define('SOURCE_PDO', '3');
// --- Exportformat defines
define('EXPORT_CVS', 'CVS');
define('EXPORT_XML', 'XML');
define('EXPORT_PDF', 'PDF');
// ---
// ---

View File

@ -336,10 +336,7 @@ function CreateExportFormatList()
$content['EXPORTTYPES'][EXPORT_CVS] = array( "ID" => EXPORT_CVS, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_CVS'] );
$content['EXPORTTYPES'][EXPORT_XML] = array( "ID" => EXPORT_XML, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_XML'] );
// Add formats by loaded extensions
if ( $content['PDF_IS_ENABLED'] )
$content['EXPORTTYPES'][EXPORT_PDF] = array( "ID" => EXPORT_PDF, "Selected" => "", "DisplayName" => $content['LN_GEN_EXPORT_PDF'] );
// TODO: Add formats by loaded extensions
}
function CreatePredefinedSearches()
@ -405,8 +402,6 @@ function CheckAndSetRunMode()
if ( in_array("mysql", $loadedExtensions) ) { $content['MYSQL_IS_ENABLED'] = true; } else { $content['MYSQL_IS_ENABLED'] = false; }
// Check PDO Extension
if ( in_array("PDO", $loadedExtensions) ) { $content['PDO_IS_ENABLED'] = true; } else { $content['PDO_IS_ENABLED'] = false; }
// Check PDF Extension
if ( in_array("pdf", $loadedExtensions) ) { $content['PDF_IS_ENABLED'] = true; } else { $content['PDF_IS_ENABLED'] = false; }
}