PDA

View Full Version : PDFlib and Quercus


dennismonsewicz
02-19-2010, 03:44 PM
After reading through the Quercus documentation, it seems as though you can use the PDFLib that PHP has... but there are no examples out there on how to use it...

I have tried the following:

<?php
$mypdf = PDF_new();
PDF_open_file($mypdf, "");
PDF_begin_page($mypdf, 595, 842);
$myfont = PDF_findfont($mypdf, "Times-Roman", "host", 0);
PDF_setfont($mypdf, $myfont, 10);
PDF_show_xy($mypdf, "Sample PDF, constructed by PHP in real-time.", 50, 750);
PDF_show_xy($mypdf, "Made with the PDF libraries for PHP.", 50, 730);
PDF_end_page($mypdf);
PDF_close($mypdf);
PDF_delete($mypdf);
?>

But when I deploy my code I get the following error:

Fatal Error: 'PDF_new' is an unknown function.

Any ideas on what could be the problem?

dennismonsewicz
02-19-2010, 03:50 PM
I am trying to use the PDFlib that PHP offers but cannot get it to run...

<?php
$mypdf = PDF_new();
PDF_open_file($mypdf, "");
PDF_begin_page($mypdf, 595, 842);
$myfont = PDF_findfont($mypdf, "Times-Roman", "host", 0);
PDF_setfont($mypdf, $myfont, 10);
PDF_show_xy($mypdf, "Sample PDF, constructed by PHP in real-time.", 50, 750);
PDF_show_xy($mypdf, "Made with the PDF libraries for PHP.", 50, 730);
PDF_end_page($mypdf);
PDF_close($mypdf);
PDF_delete($mypdf);
?>

I keep getting the following error:

Fatal Error: 'PDF_new' is an unknown function.

Any ideas on what could be wrong?

nam
02-21-2010, 03:37 AM
Hi,

It appears that we only bundled the PDF library in the Resin distribution of Quercus. The open source Quercus standalone does not have this library included. I'm not sure if this is an error on our part or a licensing issue.

dennismonsewicz
02-22-2010, 02:36 PM
How could I use Resin to build this out in PHP?