FrDeamon / EnseparHtml2pdfBundle

Html2pdf for Symfony 2 as a service.
MIT License
22 stars 22 forks source link

Work locally but not on my web server #19

Closed LucasSouriau closed 8 years ago

LucasSouriau commented 9 years ago

Hello, I've got a problem with this bundle. In fact the I'm using it on my local server (MAMP) it works perfectly. But when I try with my web server, with all the web browser, the bundle seems to don't generate correctly the pdf as you can see it here http://verifex.marco-and-doug.com/expertise/print/1

It may be link to my server config but I don't understand where is the problem..

OwlyCode commented 9 years ago

Hello.

I checked the url you provided, it appears that the content-type header is set to text/html which would explain why you get the compiled pdf code as a response.

Can you try to do this in your controller ?

$response->headers->set('Content-Type', 'application/pdf');