pofider / phantom-html-to-pdf

Highly scalable html to pdf conversion using phantom workers
MIT License
159 stars 33 forks source link

using cookie option provided is not working in the html request, while conversion #85

Open Ramprasad2k2 opened 6 years ago

Ramprasad2k2 commented 6 years ago

Hi, I am using the option "Cookies" provided in the phantom-html-to-pdf, but while sending the request to html, I did not find any cookies attached with that request. I checked this with fiddler/postman, but unable to find cookies in that request. I am unable to find the reason why it is not attaching cookies even though its provided in the option. Please help.

    cookies: [{
        name: "cookie_name",
        value: "value"
    }],

I am passing cookies as array of objects, even though its not working. Can you please ensure your side, whether this option takes the cookies with the request?

ghost commented 6 years ago

With PhantomJS 2 it is working. Upgrade by following this: https://www.npmjs.com/package/phantom-html-to-pdf#phantomjs2