Free Software Server Environment : PdfTemplates

HomePage :: Categories :: PageIndex :: RecentChanges


Search this site: FSSE.INFO is produced by "osde8info" :
http://www.setasign.de/support/manuals/fpdf-tpl/
http://www.setasign.de/support/manuals/fpdi/

PHP PDF Templates and PDF Importing


FPDF-TPL

FPDF-TPL extends TCPDF to provide PDF forms / templates

FPDI

FPDI extends TCPDF to provide PDF page importing

Example

<?php

include_once 'tcpdf/tcpdf.php';
include_once 'fpdf/fpdi2tcpdf_bridge.php';
include_once 'fpdf/fpdf_tpl.php';
include_once 'fpdf/fpdi.php';

function inc($pdf,$file)
{
        static $x ,$y;

        $pc = $pdf->setSourceFile("$file.pdf");
        $pg = $pdf->importPage(1,'/MediaBox');
        $pdf->useTemplate($pg,$x,$y);

        $x+=30;
        $y+=30;
}

$pdf = new FPDI();

$pdf->addPage();

for ($i=1 ; $i <= 6 ; $i++)
{
        inc($pdf,$i);
}

$pdf->Output('pdf.pdf','I');

?>


REFERRERS
TCPDF

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0494 seconds