Register Lost your password?

public function fGeneratePDF()

return

  • PDF


Examples

Example 1


require_once('../classes/cTransformDoc.inc');
$objDocument = new cTransformDoc();
$objDocument->setStrFile('../docx/file.docx');
$objDocument->fGeneratePDF();

    4 Responses

  • suganthi

    this can’t working fGeneratePDF -

    some error how to rectify
    Warning: ZipArchive::getFromName() [ziparchive.getfromname]: Invalid or unitialized Zip object in D:\NPIDocRoot\phpdocx_free\php5\classes\cTransformDoc.inc on line 91

    Notice: Trying to get property of non-object in D:\NPIDocRoot\phpdocx_free\php5\classes\cTransformDoc.inc on line 93

  • jorge

    Hi, the file

    $objDocument->setStrFile(’../docx/file.docx’);

    must exists to generate a PDF.
    Maybe that’s the error.

  • Jana

    In the zip file that was downloaded, a file by name ZipArchive.inc is supposed to exists under classes\ dir. This isn’t the case and that why we are getting errors. here is my php error.log:

    [14-Jan-2010 14:24:04] PHP Fatal error: require_once(): Failed opening required ‘C:\downloads\phpdocx_free\php5\classes\ZipArchive.inc’ (include_path=’.;C:\php5\pear’) in C:\downloads\phpdocx_free\php5\classes\cCreateDocx.inc on line 8

    I don’t have this file. Where can I get it?

  • nico

    @Jana

    install the php_zip and the php_xsl extensions ;)

Your comments