Hi,
I am trying to generate a report from a ASP.net page loaded. It should be straightforward as per the documentation:
Thread thread = new Thread(() => doc.LoadFromHTML("GOOGLEURL", false, true, true));
thread.SetApartmentState(ApartmentState.STA);
thread.Start();
thread.Join();
//Save pdf file.
doc.SaveToFile(@"sample.pdf");
doc.Close();
The example used in the documentation is quite simple and clear because it is using a static url with public content. However, trying to do the same with a site that requires authentication and getting my URL using "Request.Url.AbsoluteUri", results in a PDF which content is a login page .
Is there any way to convert an ASPX page that requires to be authenticated to a PDF?
Thanks