Génerer colspan en pdf !!!! aidez moi svp
Fermé
fille95
Messages postés
65
Date d'inscription
dimanche 6 avril 2008
Statut
Membre
Dernière intervention
27 mars 2011
-
9 juin 2008 à 16:15
ortys4 Messages postés 254 Date d'inscription mardi 7 novembre 2000 Statut Membre Dernière intervention 26 septembre 2010 - 10 juin 2008 à 09:04
ortys4 Messages postés 254 Date d'inscription mardi 7 novembre 2000 Statut Membre Dernière intervention 26 septembre 2010 - 10 juin 2008 à 09:04
A voir également:
- Génerer colspan en pdf !!!! aidez moi svp
- Lire le coran en français pdf - Télécharger - Histoire & Religion
- Enregistrer en pdf - Guide
- Save as pdf - Télécharger - Bureautique
- Télécharger dictionnaire larousse pdf gratuit - Télécharger - Dictionnaires & Langues
- Mode d'emploi en français gratuit pdf - Guide
2 réponses
ortys4
Messages postés
254
Date d'inscription
mardi 7 novembre 2000
Statut
Membre
Dernière intervention
26 septembre 2010
51
9 juin 2008 à 16:19
9 juin 2008 à 16:19
salut
si tu arrives a savoir si tu as un colspan ou pas tu peux faire :
if($colspan == true)
{
$this->Cell($w[0]+$w[1],7,$header[0],1,0,'C',1);
}
else
{
$this->Cell($w[0],7,$header[0],1,0,'C',1);
}
si tu arrives a savoir si tu as un colspan ou pas tu peux faire :
if($colspan == true)
{
$this->Cell($w[0]+$w[1],7,$header[0],1,0,'C',1);
}
else
{
$this->Cell($w[0],7,$header[0],1,0,'C',1);
}
ortys4
Messages postés
254
Date d'inscription
mardi 7 novembre 2000
Statut
Membre
Dernière intervention
26 septembre 2010
51
10 juin 2008 à 09:04
10 juin 2008 à 09:04
Salut,
c'est normale, vu que tu additionne la largeur de 2 cellules en 1, il faut supprimer la deuxième en faisant un soustraction sur la largeur par exemple. ou plus propre :
if (fusion == true)
{
tu format ta ligne avec la fusion
}
else
{
tu format ta ligne sans fusion
}
c'est normale, vu que tu additionne la largeur de 2 cellules en 1, il faut supprimer la deuxième en faisant un soustraction sur la largeur par exemple. ou plus propre :
if (fusion == true)
{
tu format ta ligne avec la fusion
}
else
{
tu format ta ligne sans fusion
}
9 juin 2008 à 17:22
sa marche mais sa me decale les celleules et sa m'ecrase la deuxieme ligne
voici mon code :
$this->SetFillColor(142,205,255);
$this->SetLineWidth(.3);
$this->SetFont('','B');
//En-tête : largeur des colonnes
$w=array(22,22,25,25,22,37);
$this->SetX((35)/2);
$this->Cell($w[0],7,$header[0],1,0,'C',1);
//affiche les th des traois tableaux
for($i=1;$i<count($header);$i++)
$this->Cell($w[$i],6,$header[$i],1,0,'L',1);
$this->Ln();
//Données
$fill=1;
for ($i=0;$i<count($liste_data);$i++) {
foreach($liste_data[$i] as $row)
{
$this->SetX((35)/2);
$this->SetFillColor(142,205,255);
$this->Cell($w[0],6,$row[0],'LT',0,'L',$fill);
$this->SetFillColor(255,255,255); // couleur des cellule des chiffres
$this->Cell($w[1],6,number_format($row[1],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[2],6,number_format($row[2],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[3],6,number_format($row[3],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[4],6,number_format($row[4],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[5],6,number_format($row[5],0,',',' '),'LRT',0,'C',$fill);
$this->Ln();
}
}
foreach($data_total as $row)
{
$this->SetX((35)/2);
// $this->SetFillColor(142,255,255);
$this->Cell($w[0],6,$row[0],'LT',0,'L',$fill);
$this->SetFillColor(255,255,120); // couleur des cellule des chiffres
$this->Cell($w[1],6,number_format($row[1],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[2],6,number_format($row[2],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[3],6,number_format($row[3],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[4],6,number_format($row[4],0,',',' '),'LRT',0,'C',$fill);
$this->Cell($w[5],6,number_format($row[5],0,',',' '),'LRT',0,'C',$fill);
$this->Ln();
}
$this->SetX((35)/2);
$this->Cell(array_sum($w),6,'','T');
}
merci a toi