![]() |
Integrating R&OS PDF generator in CI - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Integrating R&OS PDF generator in CI (/showthread.php?tid=1712) |
Integrating R&OS PDF generator in CI - El Forum - 06-21-2007 [eluser]andreagam[/eluser] Hi. After a long search I decided to pick R&OS PDF generation classes and try to integrate it into CI. I know, it's sooo far from being perfect, but being stuck to PHP4 I couldn't find anything better... Unfortunately, I'm still a first-timer OO coder and I don't find it easy to understand the necessary steps to integrate such classes and make a CI library or what else out of it. Does anybody want to help me and release a solution (hopefully useful to the community...)? Well, that's what I did. Downloaded the classes athttp://www.ros.co.nz.pdf, unzippd and I got: - class.pdf.php - class.ezpdf.php - fonts folder - readme.php (which actually calls the classes to produce the pdf file) - data.txt (a text file with the content to be pdf'd) I followed Danfreak advice and created a folder "my_classes" into the Application folder. Then I put into "my_classes" the 'class' files and the fonts folder. I added the 'ini_set' thing into the index.php file to make CI load the folder 'my_classes' (see this link). Am I doing right till now? Well, now I took a controller 'page' and added a function 'createpdf'. Code: function createpdf() The $pdf lines are taken from a doc example. I get as output a text page which notifies an undefined index error. in the class.pdf.php file, on line 1934. Anybody willing to help me? I'd really appreciate any help. Thanks a lot. Integrating R&OS PDF generator in CI - El Forum - 06-21-2007 [eluser]Phil Sturgeon[/eluser] Might want to look into the "creating your own libraries" stuff. Includes often get messed up in the libraries folder for me though, so I try to remove as many includes as possible or put them elsewhere. Put this in your normal libraries folder and try: Code: function createpdf() That worked for me when I was using this rubbish class. Integrating R&OS PDF generator in CI - El Forum - 06-22-2007 [eluser]andreagam[/eluser] Thanks a lot for your answer, thepyromaniac. It works for me too! You saved my day. Thanks again for lending a hand. Integrating R&OS PDF generator in CI - El Forum - 07-24-2012 [eluser]garrisonian[/eluser] How can i draw boxes ? |