PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Meysam GanJi   XePDF - Table   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: show how to use class
Class: XePDF - Table
Generate PDF with data from a table using LaTeX
Author: By
Last change:
Date: 13 years ago
Size: 1,141 bytes
 

Contents

Class file image Download
<?php
include_once "class.xePDF.php";

$packageOfAllData=array ////packageOfAllData is an optional name!
(
   
'packageOfData1'=>array //packageOfData1 is an optional name!, this package includes table1 Information
   
(
       
'title'=>"titleOfTable1", //it most be title!
       
'data'=>array //it most be data
       
(
           
'yourData1'=>array //yourData1 is an optional name!, this array is content of header of table.
           
(
               
'name1','name2','...','nameN'
           
),
           
'yourData2'=>array //yourData2 is an optional name!
           
(
               
'content1','content2','...','contentN'
           
),
           
'andKeepOn'=>array //andKeepOn is an optional name!, andKeepOn is equal to ... on math :D
           
(
               
'content1','content2','...','contentN'
           
),
           
'yourDataN'=>array //yourDataN is an optional name!
           
(
               
'content1','content2','...','contentN'
           
)
        )
    )
);
$language="";//set Persian for use xePersian package of LaTeX and blank for use native LaTeX package.
$font="XB Zar";//select your table font! (all fonts that your GNU/Linux can use them).
$latex=new xePDF($language,$packageOfAllData,$font);

echo
"<a href=\"".$latex->downloadPDF().".pdf\">Click for Download PDF</a>";
?>