$conf_url_site = "#URL_SITE_SPIP" ; $conf_nom_site = "[(#NOM_SITE_SPIP|pdf_first_clean)]" ; // Recuperation et definition des differents elements [$logo_lien="(#URL_ARTICLE)";] $site="[(#NOM_SITE_SPIP|pdf_first_clean)]"; $rubrique="[(#TITRE|supprimer_numero|pdf_first_clean)][(#NOM_SITE_SPIP|pdf_first_clean)]"; $date="[Première publication : (#DATE_REDAC|affdate|pdf_first_clean), et mis en ligne le ] [(#DATE|nom_jour)] [(#DATE|affdate|pdf_first_clean)]"; $auteur="[(#NOM|pdf_first_clean)]"; $motsclef="[(#TITRE|pdf_first_clean)]"; $yahoo="-- [(#TITRE|supprimer_numero|pdf_first_clean)] --"; [$logo_fichier="(#LOGO_ARTICLE_RUBRIQUE|fichier)";] [$surtitre="(#SURTITRE|pdf_first_clean)";] [$titre="(#TITRE|SUPPRIMER_NUMERO|pdf_first_clean)";] [$soustitre="(#SOUSTITRE|pdf_first_clean)";] [$chapo="(#CHAPO|pdf_first_clean)";] [$descriptif="(#DESCRIPTIF|pdf_first_clean)";] [$texte= "(#TEXTE|pdf_first_clean)";] [$ps="(#PS|pdf_first_clean)";] [$notes="(#NOTES|pdf_first_clean)";] $id_article = #ID_ARTICLE ; $files_pdf = "article_".$id_article.".pdf" ; $file_out = $path_pdf . $files_pdf ; if (file_exists($file_out)) { clearstatcache ; $damo = date(YmdHi , strtotime("#DATE_MODIF")) ; $dage = date(YmdHi , filemtime($file_out)) ; if ($damo > $dage) {unlink($file_out);} } $files_pdf = "article_".$id_article.".pdf" ; $file_out = $path_pdf . $files_pdf ; header("Location: index.php"); exit; if ($debug != 0 && file_exists($file_out)) { unlink($file_out); } if (! file_exists($file_out)) { define('FPDF_FONTPATH',$class_path.'font/'); require_once($class_path.'fpdf.php'); require_once($class_path.'lib_pdf_global.php'); require_once($class_path.'lib_pdf_spip.php'); //-------------------------------- // Debut génération du PDF //-------------------------------- $pdf->debug=$debug; $pdf=new PDF_SPIP(); $pdf->Open(); $pdf->SetDisplayMode (fullwidth, continuous); $pdf->SetTitle($titre); $pdf->SetCreator($site); $pdf->SetAuthor($auteur); $pdf->SetCompression(false); $pdf->SetSubject($rubrique); $pdf->SetKeywords($motsclef); $pdf->SetMargins(25,25); $pdf->SetAutoPageBreak(auto, 30); $pdf->AjouterChapitre() ; // Sortie $pdf->Output( $file_out ) ; } if ($debug == 0) { header("location: ".$file_out."" ); } exit; ?>