Beispiel #1
0
function produce_pdf()
{
    include "pdf/phpToPDF.php";
    $PDF = new phpToPDF();
    $PDF->AddPage();
    $PDF->SetFont("Arial", "B", 16);
    $PDF->Text(40, 10, "Uniquement un texte");
    $PDF->Output();
    //$PDF->Output("test.pdf","F");
    // affiche le document test.PDF dans une iframe.
    /*echo '
    	<iframe src="test.pdf" width="100%" height="100%">
    	[Your browser does <em>not</em> support <code>iframe</code>,
    	or has been configured not to display inline frames.
    	You can access <a href="./test.PDF">the document</a>
    	via a link though.]</iframe>
    ';*/
}
Beispiel #2
0
require_once 'php2pdf/phpToPDF.php';
include_once 'fonctions.php';
$dsondage = get_sondage_from_id($_POST['numsondage']);
$lieureunion = stripcslashes($_POST["lieureunion"]);
$datereunion = explode("@", $_POST["meilleursujet"]);
//creation du fichier PDF
$PDF = new phpToPDF();
$PDF->AddPage();
$PDF->SetFont('Arial', '', 11);
//affichage de la date de convocation
$PDF->Text(140, 30, "Le " . date("d/m/Y"));
$PDF->Image("./" . LOGOLETTRE . "", 20, 20, 65, 40);
$PDF->SetFont('Arial', 'U', 11);
$PDF->Text(40, 120, "Objet : ");
$PDF->SetFont('Arial', '', 11);
$PDF->Text(55, 120, _(' Convocation'));
$PDF->Text(55, 140, _('Hello,'));
$PDF->Text(40, 150, _("You're invited at the meeting") . ' "' . utf8_decode($dsondage->titre) . '".');
$PDF->SetFont('Arial', 'B', 11);
$PDF->Text(40, 170, _('Informations about the meeting'));
$PDF->SetFont('Arial', '', 11);
$PDF->Text(60, 180, _('Date') . ' : ' . date("d/m/Y", "{$datereunion['0']}") . ' ' . _('at') . ' ' . $datereunion[1]);
$PDF->Text(60, 185, _('Place') . ' : ' . utf8_decode($lieureunion));
$PDF->Text(55, 220, _('Cordially,'));
$PDF->Text(140, 240, utf8_decode($dsondage->nom_admin));
$PDF->SetFont('Arial', 'B', 8);
// TODO: translate
$PDF->Text(35, 275, "Cette lettre de convocation a été générée automatiquement par " . NOMAPPLICATION . " sur " . $_SERVER['SERVER_NAME']);
//Sortie
$PDF->Output();