Reputation: 655
I'm trying to make PDF's of some webpages on the same site but since the website is behind Windows Authentication it failes. I can load the page markup using a HttpRequest and WindowsIdentity.Impersonate() but when the PDF plugin tries to create the PDF this is, naturally, without any stylesheets.
I'm using TuesPechkin and wkhtmltopdf to generate the PDF's. This is a ASP.NET webforms solution. Any suggestions?
Upvotes: 0
Views: 296
Reputation: 1887
I think the LoadSettings class is where you want to look. If the Username
and Password
properties don't propagate through to the external resources (CSS, images, etc.) you can try setting up a basic Authentication
header yourself in the CustomHeaders
dictionary and setting the RepeatCustomHeaders
property to true
.
Upvotes: 0