raykolbe / DOMPDFModule

A Zend Framework module for Dompdf
MIT License
61 stars 62 forks source link

External CSS and @media print #17

Open lisamarie2000 opened 10 years ago

lisamarie2000 commented 10 years ago

Hello Ray,

First of all, good work!

I have some questions: Is it possible to use external style sheets? I am using ZF2 and was trying to set a basePath to use my stylesheets, but it doesn´t work. My stylesheets which I am using (embedded in an extra layout.phtml) do not show up or seem to have an effect on the pdf.

What should be exactly in the basePath? While having a normal Zend Framework 2 Skeleton Application? I tried it with $model->setOption('basePath', '/public/'), as my path in the layout.phtml is ...->appendStylesheet($this->basePath() . '/css/main.css'), but it is not working.

And another issue, is it possible to use @media print with the DOMPDFModule? I tried it inline with @media print { h1 { color: indianred; }}, but no success. It only takes affect when saving the pdf manually via the browser ("Print"/...), but not in the generated PDF from the module.

Thanks!

vmasterua commented 10 years ago

I have the same problem.

raykolbe commented 7 years ago

Hi @lisamarie2000 and @vmasterua,

As you've noticed DOMPDFModule hasn't received the time and attention it deserves. I understand how frustrating this is and I'm sorry you've had to deal with this frustration 😢

I'm currently taking steps to stabilize DOMPDFModule which includes code updates as well as creating a backlog that will ensure its continued success.

You can follow project Phoneix to see what immediate work is being prioritized.

Thank you for your understanding and patience.