Welcome Guest, Not a member yet? Register   Sign In
Integrating R&OS PDF generator in CI
#1

[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()
{                
require_once("class.ezpdf.php");
    $pdf =& new Cezpdf();
    $pdf->selectFont('./fonts/Helvetica.afm');
    $pdf->ezText('Hello World!',50);
    $pdf->ezStream();
}

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.


Messages In This Thread
Integrating R&OS PDF generator in CI - by El Forum - 06-21-2007, 09:16 AM
Integrating R&OS PDF generator in CI - by El Forum - 06-21-2007, 05:21 PM
Integrating R&OS PDF generator in CI - by El Forum - 06-22-2007, 02:31 AM
Integrating R&OS PDF generator in CI - by El Forum - 07-24-2012, 03:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB