Click here to Skip to main content
15,897,704 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
PHP
function pdf_create()
{
    $this->load->library('cezpdf');
    $db_data[] = array('name' => 'Jon Doe', 'phone' => '111-222-3333', 'email' => 'jdoe@someplace.com');
    $db_data[] = array('name' => 'Jane Doe', 'phone' => '222-333-4444', 'email' => 'jane.doe@something.com');
    //$db_data[] = array('name' => 'Jon Smith', 'phone' => '333-444-5555', 'email' => 'jsmith@someplacepsecial.com');

    $col_names = array(
    'name' => 'Name',
    'phone' => 'Phone Number',
    'email' => 'E-mail Address'
    );

    $this->cezpdf->ezTable($db_data, $col_names, 'Contact List', array('width'=>550));
    $this->cezpdf->ezStream();
}

this code show output only table blank with column and row
I NEEDED table with record what problem with this code pls tell me
Posted
Updated 11-Jun-18 1:27am
Comments
woutercx 28-Jul-12 6:52am    
The code is exactly like the demo, so that's not it..

Maybe this is because the version you're using has a bug:

http://codeigniter.com/user_guide/changelog.html[^]:

Version 2.0.0
Release Date: January 28, 2011
Hg Tag: v2.0.0

Table library will generate an empty cell with a blank string, or NULL value.

So since version 2.0.0 this should be fixed.
 
Share this answer
 
Comments
nilesh026 28-Jul-12 7:20am    
i am using version 2.1.2
I read somewhere:

http://rokonrock.wordpress.com/2008/11/01/generating-pdf-files-using-codeigniter/[^]

R&OS also requires some font files in order to function and they have been placed at the root of the .zip file in a folder called fonts.

Here they speak about how to set the font:
http://bytes.com/topic/php/answers/506726-font-problems-ezpdf[^]
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900