Rotativa
Rotativa copied to clipboard
Rotativa.MVC.ActionAsPdf won't pass cookies
I can't pass cookies other than __RequestVerificationToken into the cookie collection - they're mysteriously treated as URLs:
Error: Failed loading page http://spoof-group (sometimes it will work just to ignore this error with --load-error-handling ignore) QFont::setPixelSize: Pixel size <= 0 (0) Exit with code 1 due to network error: HostNotFoundError
Adding "--load-error-handling ignore" as a custom switch doesn't fix the issue.
I use var view = new ViewAsPdf(); view.Cookies = Request.Cookies.AllKeys.ToDictionary(k => k, k => Request.Cookies[k].Value);