Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Community Voice - Generating PDF files using CodeIgniter
#51

[eluser]mrtopher[/eluser]
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...s-and-more

Hope this helps.
#52

[eluser]LTFMIKE[/eluser]
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....;-)
#53

[eluser]renju[/eluser]
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.
#54

[eluser]Unknown[/eluser]
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.
#55

[eluser]renju[/eluser]
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.
#56

[eluser]Unknown[/eluser]
renju please how do you make it work?
please give me an example. how do you set the $imgImage?
thks
#57

[eluser]renju[/eluser]
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.
#58

[eluser]nikes[/eluser]
Thanks mrtopher, i absolutely accepted your help.
#59

[eluser]Felix Cheruiyot[/eluser]
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);
#60

[eluser]nikes[/eluser]
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?




Theme © iAndrew 2016 - Forum software by © MyBB