wkhtmltopdf Log in to asp.net web app

前端 未结 4 1807
北恋
北恋 2021-01-12 09:18

Having a problem with wkhtmltopdf. I\'m using it to take pdf snapshots of pages on a website that has a username/password page. When the .exe runs, I end up with a snapsho

4条回答
  •  迷失自我
    2021-01-12 10:01

    I had a similar issue with my application that works on ASP.Net forms authentication. I had to pass in the authentication cookie like this to get it to work.

    --cookie         
    

    Important catch is that no additional cookie must be passed apart from auth cookie. Because some cookies with cause authentication to fail and even if it doesn't it will slow up the wkhtml process because wkhtml will have to process each cookie passed to it

提交回复
热议问题