Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generating PDFs with PHP mini #51

Closed
johoehn opened this issue Nov 20, 2018 · 3 comments
Closed

Generating PDFs with PHP mini #51

johoehn opened this issue Nov 20, 2018 · 3 comments

Comments

@johoehn
Copy link

johoehn commented Nov 20, 2018

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?

@panique
Copy link
Owner

panique commented Nov 20, 2018

Hi, do you have some kind of error message ?

@johoehn
Copy link
Author

johoehn commented Nov 21, 2018

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

@LearningTools
Copy link

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants