Free Software Server Environment : PdfTemplates

HomePage :: Categories :: PageIndex :: RecentChanges


Search this site: FSSE.INFO is produced by "osde8info" :

Revision [760]

Most recent edit made on 2008-10-02 16:10:42 by FsseInfo

Additions:

PHP PDF Templates and PDF Importing



Deletions:

PHP PDF Templates and PDF Importing





Revision [755]

The oldest known version of this page was edited on 2008-10-02 16:05:24 by FsseInfo

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
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.1825 seconds