raykolbe / DOMPDFModule

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

setting filename does not trigger download #19

Closed raymondelferink closed 7 years ago

raymondelferink commented 10 years ago

Hi Raymond,

Almost everything works smoothly for me, except: You say somewhere that setting the filename will trigger download. I have set: $model->setOption('fileName', 'voucher');

which should get me a download to voucher.pdf, but instead the pdf is opened in the browser window and when I save it from the acrobat plugin it has the name document.pdf

Am I doing something wrong, or have I stumbled upon something unexpected?

Thanks in advance, Raymond:-)

traedamatic commented 10 years ago

Hey,

same issue, but it is just a mis-typing

See Line 121 of the PdfStrategy:

$fileName = $e->getModel()->getOption('filename');

and change it to

$fileName = $e->getModel()->getOption('fileName');

cheers, nicolas

raykolbe commented 7 years ago

Hi @raymondelferink and @traedamatic,

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.

raykolbe commented 7 years ago

Hi @raymondelferink

I recently patched this in https://github.com/raykolbe/DOMPDFModule/pull/65. This will make it into the next release (0.5.0).

This change is currently in master: https://github.com/raykolbe/DOMPDFModule/commit/2ede51bcfd64ad4becfbbb8c085a656305bfbb5f

Closing issue. Please reopen if you continue to experience issues.