PHP Classes

XePDF - Table: Generate PDF with data from a table using LaTeX

Recommend this page to a friend!
  Info   View files View files (3)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 561 All time: 5,428 This week: 263Up
Version License PHP version Categories
xepdf-table 1.0.0GNU General Publi...5.0PHP 5, Files and Folders, Printing
Description 

Author

This class can generate PDF with data from a table using LaTeX.

It takes an array of data and generates a LaTeX file to display the data in a table.

The class calls the XE LaTeX program to render the generated file and output the result in a PDF file.

Picture of Meysam GanJi
Name: Meysam GanJi <contact>
Classes: 2 packages by
Country: Iran Iran
Age: 34
All time rank: 224330 in Iran Iran
Week rank: 314 Up7 in Iran Iran Up

Details

xePDF v1.0 11 Feb. 2011 ============================================= Package of your Data most have a format like this: $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' ) ) ), 'packageOfData2'=>array //packageOfData2 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' ) ) ), 'andKeepOn'=>array //andKeepOn is an optional name!, this package includes table... 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' ) ) ), 'packageOfDataN'=>array //packageOfDataN is an optional name!, this package includes tableN 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' ) ) ) ); You can see the result of this exmple on ReadMe.pdf. ============================================= How to use? after make an array like top, create a new object from xePDF like this: $object=new xePDF($language,$data,$font); $language set the package of LaTeX that make your pdf, if let this as blank, xePDF don't use any package, as default you can use persian for $language; you can add your native language and package to class by change on line 64 of class.xePDF.php, change persian and xepersian, if nessecary also change xelatex on line 109. $data is your information array that you create it on top :) $font set the text font of PDF, you can use all fonts that your GNU/Linux uses them, for install a font create a folder and set his name to .fonts then copy fonts on it, open the terminal and run this command : fc-cache . after create your object, run program with $object->downloadPDF(), it's make an address to PDF file. ============================================= Meysam GanJi [p.g.meysam@gmail.com - http://meysam.anarnet.ir], Student of Department of mathematics and Computer Sience, Vali-e-Asr of Rafsanjan university.

  Files folder image Files  
File Role Description
Plain text file class.xePDF.php Class the main class of xePDF
Accessible without login Plain text file ReadMe.txt Doc. Documentation of class.
Accessible without login Plain text file sample.php Example show how to use class

 Version Control Unique User Downloads Download Rankings  
 0%
Total:561
This week:0
All time:5,428
This week:263Up