Search code examples
phpdompdfjpgraph

Somebody knows how to include jpgraph into dompdf?


Somebody knows how to include jpgraph into dompdf?

This is my code for DOMPDF:

//generamos el PDF
require_once("../dompdf/dompdf_config.inc.php");
    if ( get_magic_quotes_gpc() ) {
        $html = stripslashes($html);
        $old_limit = ini_set("memory_limit", "64M");
        $dompdf = new DOMPDF();
        $dompdf->load_html($html);
        $dompdf->set_paper('letter', 'portrait'); //landscape , portrait
        $dompdf->render();
        $dompdf->stream("TPE - Reporte F.E.A. $asignaturashort.pdf");       
        exit(0);
        }
    }

DOMPDF is running great but I need to add a graph before creating the PDF using jpgraph library. Do somebody know how to do that? Thanks!


Solution

  • You need to do it exactly the same way you would to it in a regular HTML document. Something like this.