génération pdf depuis html
FossilOrigin-Name: ae0bb1a96a743b32009fb9198051568278f05a15148ca6141c9576b6956929ec
This commit is contained in:
parent
c8319d767a
commit
057357a58d
3 changed files with 232 additions and 23 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Garradin;
|
||||
|
||||
use Garradin\Plugin\RecusFiscaux\RecusPDF;
|
||||
use Garradin\Plugin\RecusFiscaux\HtmlPDF;
|
||||
use Garradin\Plugin\RecusFiscaux\Utils;
|
||||
use Garradin\Plugin\RecusFiscaux\Personne;
|
||||
|
||||
|
|
@ -31,11 +31,10 @@ $listeFichiers = [];
|
|||
|
||||
foreach ($totalPersonnes as $idPersonne => $personne) {
|
||||
// générer un fichier par reçu
|
||||
$pdf = new RecusPDF(
|
||||
'DejaVu',
|
||||
'SerifCondensed',
|
||||
$pdf = new HtmlPDF(
|
||||
$nomAsso,
|
||||
$adresseAsso,
|
||||
$plugin->getConfig('objet_asso'),
|
||||
$logoCERFA,
|
||||
$signature
|
||||
);
|
||||
|
|
@ -59,13 +58,8 @@ foreach ($totalPersonnes as $idPersonne => $personne) {
|
|||
$personne->codePostal,
|
||||
$personne->ville
|
||||
);
|
||||
// fabriquer le nom du fichier PDF
|
||||
$nom = str_replace(' ', '_', $personne->nomPrenom);
|
||||
$nom = str_replace("'", "", $nom);
|
||||
// $nomFichier = Utils::getPDFDirectory() . "/" . 'recu_' . $annee_recu . '_' . $nom . '.pdf';
|
||||
$nomFichier = PLUGIN_ROOT . '/pdf/recu_' . $_SESSION['annee_recu'] . '_' . $nom . '.pdf';
|
||||
|
||||
$pdf->Output('F', $nomFichier);
|
||||
// fabriquer le fichier PDF
|
||||
$nomFichier = \Garradin\Utils::filePDF($pdf->get());
|
||||
// ajouter le nom du fichier à la liste pour mettre dans une archive
|
||||
$listeFichiers[] = $nomFichier;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue