[SOLVED] PHP List Plugin : PDF output

Status
Not open for further replies.

marcq

Member
Hi,

I would like to generate a PDF file (with dompdf) directly from the list view.

I have installed the PHP list plugin and put the following code into the PHP field :

Code:
require("libraries/dompdf/dompdf_config.inc.php");

$html =
  '<html><body>'.
  '<p>TEST GENERATION FICHIER PHP.</p>'.
  '</body></html>';

$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream("sample.pdf");

But nothing happens. Is there a way to generate a dompdf file directly from the list view ?

Thanks,

Marc
 
There's a option to show a PDF button in list settings "Layout".
is there a reason to do it via a php plugin?

gesendet mit Tapatalk
 
There's a option to show a PDF button in list settings "Layout".
is there a reason to do it via a php plugin?

gesendet mit Tapatalk

Thank you troester, I haven't see that you add implement it in the list settings. Marc
 
Status
Not open for further replies.
Back
Top