Add header to pdf

This commit is contained in:
sparkyx 2007-08-15 20:54:29 +00:00
parent 270527e263
commit c079ab0c0f
2 changed files with 10 additions and 4 deletions

View file

@ -29,8 +29,9 @@ include_once("postgres.php");
include_once("class.ezpdf.php");
include_once("impress_inc.php");
include("poste.php");
require_once ('header_pdf.php');
$cn=DbConnect($_SESSION['g_dossier']);
$cn=DbConnect($_SESSION['g_dossier']);
foreach ($_POST as $key=>$element) {
${"$key"}=$element;
}
@ -41,8 +42,10 @@ foreach ($_POST as $key=>$element) {
$ret="";
$pdf=& new Cezpdf();
$pdf=new Cezpdf();
$pdf->selectFont('./addon/fonts/Helvetica.afm');
header_pdf($cn,$pdf);
if ( count($a_poste) == 0 ) {
$pdf->ezStream();
return;
@ -89,6 +92,7 @@ foreach ($a_poste as $poste)
//New page
$pdf->ezNewPage();
header_pdf($cn,$pdf);
}
$pdf->ezStream();

View file

@ -29,6 +29,7 @@ include_once("postgres.php");
include_once("class.ezpdf.php");
include_once("impress_inc.php");
require_once("class_fiche.php");
require_once ('header_pdf.php');
$cn=DbConnect($_SESSION['g_dossier']);
foreach ($_POST as $key=>$element) {
@ -36,7 +37,7 @@ foreach ($_POST as $key=>$element) {
}
$ret="";
$pdf=& new Cezpdf();
$pdf= new Cezpdf();
$pdf->selectFont('./addon/fonts/Helvetica.afm');
@ -50,7 +51,7 @@ if ( count($array) == 0 ) {
continue;
}
$Libelle=sprintf("(%s) %s ",$Fiche->id,$Fiche->getName());
header_pdf($cn,$pdf);
// $pdf->ezText($Libelle,30);
$pdf->ezTable($array,
array ('jr_internal'=>'Opération',
@ -81,6 +82,7 @@ $pdf->ezText($str_solde,14,array('justification'=>'right'));
//New page
$pdf->ezNewPage();
header_pdf($cn,$pdf);
$pdf->ezStream();