Part of the EllisLab Network
   
4 of 5
4
CodeIgniter Community Voice - Generating PDF files using CodeIgniter
Posted: 26 March 2010 03:14 AM   [ Ignore ]   [ # 46 ]  
Lab Assistant
RankRank
Total Posts:  101
Joined  01-24-2010
Avijit - 26 March 2010 06:51 AM

Because once I wanted to add image in my pdf file while using R&OS;? In modern day, client wants image based PDF in their(suppose logo,add etc.) site. R&OS;could not provide this to me. Many found problem in using R&OS;.
That’s why I suggest it because I used FPDF and it is working smoothly. I also heard TCPDF(www.tcpdf.org/) you can also try with this.
Thanks
Avijit

i got the fpdf.php.. where should i put this file?? in what directory?
is there any more file that i must put in CI?? what file and where to put..

 Signature 

-the Beginner-

Profile
 
 
Posted: 26 March 2010 04:27 AM   [ Ignore ]   [ # 47 ]  
Lab Assistant
RankRank
Total Posts:  101
Joined  01-24-2010

hey..anyone can give me simple hello world generate in pdf using fpdf in CodeIgniter??
i got really hard time to find the way to load the class and use its code..
please help me..

 Signature 

-the Beginner-

Profile
 
 
Posted: 21 May 2010 08:29 AM   [ Ignore ]   [ # 48 ]  
Grad Student
Rank
Total Posts:  50
Joined  10-14-2008

The tutorial is working out of the box.
I’m using it with CI 1.7.2.

Has anyone succeeded to get Unicode characters working with this pdf class??

Profile
 
 
Posted: 20 July 2010 12:17 PM   [ Ignore ]   [ # 49 ]  
Summer Student
Total Posts:  14
Joined  07-20-2010

First of all ,
Hello to everyone ,
I am discovering This framework while starting a new project for a completely new job for me.
I’am interesting by this class concerning pdf document.
I’ve read all the page in the forum but i didn’t found an answer.

here’s is my problem.


I just want to open a pdf.file inside a specific div :
for example :
in my controller :

if (isset($_GET[‘fichier’]))$data[‘fichier’] = $_GET[‘fichier’];—-< which is a previous pdf file clicked
$this->load->view(‘cadre/test’,$data);

in my views :

<div><?php readgzfile(base_url().$fichier);?></div>

for the moment , I tried a lot of think , including : $this->load->helper(‘file’);
before loading my views.

i tried to use : readfile ()

readgzfile()

but result is always displayed like that : PDF READER :
%PDF-1.4 %Ç쏢 5 0 obj <> stream xœµYY’5.^û~£›ª6–Ù~à–„äg)–¢BfËLÂ$¬wᜉpäÝ=í øÉ<IJdë“ä–%ÿLpL„¿2xx>QNëÂ�Tìé£ ´“ÑHŽ–)�Á@höôtú:³´ÆÀ’ÆéË,©Åž%Ø£ 50㤋{ji:.·FyEÈJ


please , i need help to continue this project ,
I like to use CodeIgniter and i want to continue white it.

Is my problem can be solved easily ?

Thanks for reading me , and excuse me for my very bad english !!!

Regards.

MIKE.

Profile
 
 
Posted: 20 July 2010 02:27 PM   [ Ignore ]   [ # 50 ]  
Grad Student
Rank
Total Posts:  61
Joined  06-03-2006

Hey Mike,

Not sure your in the right place. The PDF library outlined in the post and this forum thread is used for generating PDFs from code. It doesn’t really have anything to do with viewing and opening them. That is typically handled on a users computer and the software they have installed.

I could be mistaken, but it sounds like you are looking for something that will render a PDF file within a page and allow the user to view/read the document. If that’s the case, you may want to check out Scribd: http://www.scribd.com/. This site allows you to share documents online and they have a widget that allows you to embed documents within web pages for viewing:

http://support.scribd.com/entries/143884-sharing-your-documents-activities-and-more

Hope this helps.

 Signature 

The blog: ChrisMonnat.com

Profile
 
 
Posted: 21 July 2010 03:48 AM   [ Ignore ]   [ # 51 ]  
Summer Student
Total Posts:  14
Joined  07-20-2010

Dear mrtopher
Thanks a lot for your answer,

I’m sorry for posting at the wrong place..As you said : the Pdf librairy is used only to generate PDF from code.

I think that I will try to post in an other Area in the forum ,
I took a look to your reply and your tips , but it seems to be not complient with what i want to do with my application.

I just want to open a classic pdf file inside a codeigniter view.
Of course , I try to open by using URL HELPER and Windows.open with target “_blank”
It works , but If I want to click on the form just behind the PDF file : I loose Focus
and I must click on the windows Pdf file again to get Information and return to my form by loosing focus again.

Thanks a lot for your advice….

I’m gonna post in an other Section in the forum….

LTFMIKE.

Thanks for reading me…. and my bad english….wink

Profile
 
 
Posted: 11 May 2011 06:33 AM   [ Ignore ]   [ # 52 ]  
Summer Student
Total Posts:  9
Joined  03-25-2011

I used ezpdf library, it is working fine for tables and plane texts.
But it doesn’t show images. Any option to include image in the ezpdf.
Please Help me.

 Signature 

Renju R Krishnan (Software Developer, Euphontec Software Solutions Pvt.Ltd)
Website:www.renjurkrishnan.com

Profile
 
 
Posted: 18 May 2011 11:35 PM   [ Ignore ]   [ # 53 ]  
Summer Student
Total Posts:  14
Joined  05-18-2011

Has anyone found the solution as to why images are not showing in ezPDF?

I tried both paths to the file even tried using the addJpegFromFile function but still nothing.

I don’t wanna start on another library cause that’s the only functionality missing from ezPDF.

Profile
 
 
Posted: 16 June 2011 05:07 AM   [ Ignore ]   [ # 54 ]  
Summer Student
Total Posts:  9
Joined  03-25-2011

Finally I find the solution for this drawback of the ezpdf.
Now we can add the image in the ezpdf by using addImage()in the pdf controller

eg:$this->cezpdf->addImage($imgImage,300,100,250,150);

Hopefully it will help you. Best of luck.

 Signature 

Renju R Krishnan (Software Developer, Euphontec Software Solutions Pvt.Ltd)
Website:www.renjurkrishnan.com

Profile
 
 
Posted: 22 July 2011 01:17 PM   [ Ignore ]   [ # 55 ]  
Summer Student
Total Posts:  1
Joined  07-22-2011

renju please how do you make it work?
please give me an example. how do you set the $imgImage?
thks

Profile
 
 
Posted: 23 July 2011 12:46 PM   [ Ignore ]   [ # 56 ]  
Summer Student
Total Posts:  9
Joined  03-25-2011

hi des-cec,
That is simple. See the following code I implemented.

$imgPath=‘images\\example.jpg’; //full path of the image
$imgImage = ImageCreatefromjpeg($imgPath);// prepare image for pdf
$this->cezpdf->addImage($imgImage,$x,$y,$w,$h);// add image into the pdf.
                                //$x,$y x and y coordinate values(integer) $w- width, $h- height.

Actually it was a serious drawback in cezpdf. Now it is resolved.
I think it will help you.
Good Luck.

 Signature 

Renju R Krishnan (Software Developer, Euphontec Software Solutions Pvt.Ltd)
Website:www.renjurkrishnan.com

Profile
 
 
Posted: 25 July 2011 11:46 PM   [ Ignore ]   [ # 57 ]  
Grad Student
Avatar
Rank
Total Posts:  33
Joined  07-25-2011

Thanks mrtopher, i absolutely accepted your help.

 Signature 

Welcome to my web site:www.dailygames365.com|www.dailyarcadegames1.com

Profile
 
 
Posted: 09 August 2011 03:14 PM   [ Ignore ]   [ # 58 ]  
Summer Student
Avatar
Total Posts:  2
Joined  07-21-2011

I find this quite helpful but I have a little problem.

I have managed to generate a pdf file from mysql result but the problem comes in the justification part when handling tabular data.
I’m handling currency data hence I prefer it justified right. Below is how I passed the justification option but It seems not to work.Someone Please help.

$options=array(‘justification’=>’right’);
$this->cezpdf->ezTable($data[‘display_results’], $titlecolumn,’Payroll Report’,$options);

Profile
 
 
Posted: 09 August 2011 11:51 PM   [ Ignore ]   [ # 59 ]  
Grad Student
Avatar
Rank
Total Posts:  33
Joined  07-25-2011

How can I force obtain using the created pdf, I attempted the output purpose but not in a placement to force download. how can I do ti?

 Signature 

Welcome to my web site:www.dailygames365.com|www.dailyarcadegames1.com

Profile
 
 
Posted: 08 December 2011 10:14 AM   [ Ignore ]   [ # 60 ]  
Grad Student
Rank
Total Posts:  59
Joined  03-16-2010

Hello
I am new in using the R&OS; library. I have studied the sample which shows how to create a contact list where each line displays the name, the phone number and the Email. That is fine but my problem is that I would like to have, for each contact, a second line showing the address and a third line displaying the zip code and the city. I found nothing in the documentation explaining that.
I would greatly appreciate if someone could give me the solution. Thanks in advance.

CapErquy

Profile
 
 
   
4 of 5
4