Is it possible for Dompdf to run PHP code?

Asked

Viewed 169 times

0

I have to run some commands in php to generate a table ,after that, I store this result in a variable run the echo command and the table is shown on the screen. The problem is when I try to run it in Dompdf, when I try to run:

$dompdf->load_html( // variável que contem a tabela ->$r);`

The pdf is generated but with no information inside, ?

  • It depends a lot on your html, these php libraries for pdf generation are usually very limited in terms of html rendering, recently used mpdf and suffered a lot with this type of problem. I advise using Chromepdf(https://github.com/abalozz/chrome-pdf-php), it uses Chrome Apis to do various things, including generating pdf as if to print the page.

  • It generates the pdf from a URL, without taking into account the code ?"

  • Excuse the ignorance ,but how the installation works ?

  • I answered that in your previous question.

  • It is possible, as long as you use an output buffer, see there.

  • It’s I didn’t really understand the installation process. "I’m pretty lay"

  • Download the files ,put in the same directory of the page q would use , when I see in the browser happen this error : Fatal error: Uncaught Error: Class 'Nuzkito Chromepdf Chromepdf' not found in C: wamp64 www Flex pf.php on line 69 ( ! ) Error: Class 'Nuzkito Chromepdf Chromepdf' not found in C: wamp64 www Flex pf.php on line 69

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.