bauhausjs / phantom-html2pdf

Node module to generate PDFs from HTML via PhantomJS
MIT License
112 stars 47 forks source link

Callback is not returning errors? #16

Closed SamVerschueren closed 7 years ago

SamVerschueren commented 9 years ago

Hi, thanks for the library, works very well!

I was wondering why the callbacks in methods like convert, toBuffer, ... do not apply to the NodeJS callback style (err, result)? Is there any specific reason or would it be better to refactor this?

Maybe if we are refactoring this, add support for Promises as well?

Would be happy to do a PR. Just let me know what you think.

terehov commented 9 years ago

Thank you Sam! Yes, of course. You are more than welcome to join and I would love to switch to promises. Your support is highly appreciated! :-)

SamVerschueren commented 9 years ago

Alright, thank you for the feedback. If I find some time I will do a PR for this one.

SamVerschueren commented 9 years ago

Would you like to remove the callback entirely or support both?

terehov commented 9 years ago

Great, I also thought about that. I'd prefer to support both. :-)

lekhnath commented 8 years ago

Error first callback please.

dustin-H commented 7 years ago

Already solved by #34. Just forgot to close.