mini3 icon indicating copy to clipboard operation
mini3 copied to clipboard

Generating PDFs with PHP mini

Open johoehn opened this issue 6 years ago • 3 comments

I want to use dompdf, I installed it via composer. I did

use Dompdf\Dompdf;

in top of the Controller and used it like the example says:

    $dompdf = new Dompdf();
    $dompdf->loadHtml('hello world');
    $dompdf->setPaper('A4', 'landscape');
    $dompdf->render();
    $dompdf->stream();

The browser cannot open the pdf, the error occurs only in PHP Mini framework, I tried it in a separate project and it worked without problems. Do you have any ideas?

johoehn avatar Nov 20 '18 11:11 johoehn

Hi, do you have some kind of error message ?

panique avatar Nov 20 '18 18:11 panique

No, there is no error, the downloaded file is just 1KB and can't open.

johoehn avatar Nov 21 '18 10:11 johoehn

Hello, I just did a test with the FPDF library and if you generate the pdf, you should try this other library, greetings. sorry for my bad English

LearningTools avatar Jan 23 '19 22:01 LearningTools