bauhausjs / phantom-html2pdf

Node module to generate PDFs from HTML via PhantomJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Callback is not returning errors?

SamVerschueren opened this issue · comments

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.

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! :-)

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

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

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

Error first callback please.

Already solved by #34. Just forgot to close.