I use wkhtmltopdf to load a page and create a pdf, as described in here . Everything works as expected, but when it reaches the next line:
int read = proc.StandardOutput.BaseStream.Read(buffer, 0, buffer.Length);
It takes a lot of time to continue. I also tried the following:
proc.Start(); string output = proc.StandardOutput.ReadToEnd(); string error = proc.StandardError.ReadToEnd(); proc.WaitForExit();
But the same thing happens on line 2 ( proc.StandardOutput.ReadToEnd() ).
How can I debug this?
Note. Since I am debugging the entire project, I see that the page called by the wkhtmltopdf process is only called after a delay. Thus, a delay occurs between the OS call and the page load itself.
Edit
So, I changed some of the arguments to just http://google.com - and executed pretty quickly.
So, the problem is somewhere in my full argument: --stop-slow-scripts --redirect-delay 1500 --cookie MOODLEID_ %25E2%25C8%2513E%25BD --cookie ASP.NET_SessionId mg3mfaisk45zn5y1aql0glbb --cookie .ASPXAUTH FEA3D10032E211EDB330E967D8F19A324A912AD792219CA281451AA809F1B580B25466DAF81DE30DF07252FF13F0888C88ED4DB5871579F1DA3EBAA447CBF860131F6FF00A763C9207CE13BCB143301E49A2B00EEBBF1F4AE14F109DF1BE8D3B39C43478B99E4C686C3849D1D51DDBFA3D2E871691BAB8346FE5195D867F88F662F72E40 http://localhost:8404/Relatorio/GeralEstaticoPDF?id=15&pesq_cod=0&IncluirParciais=True&NomesImagens[0]=3fd5b6a2-76a4-470b-af99-93500cc90431.png&NomesImagens[1]=c1c86234-c338-4285-9d25-5069be36a213.png&NomesImagens[2]=4562f9a3-72aa-452c-9736-6d0ba65f59ce.png&NomesImagens[3]=dbc54344-6248-4ee3-9e43-9cb3ef89cc67.png&NomesImagens[4]=8c954917-d572-4d4a-b6fd-2b9cd09e8f8e.png - % 25BD --cookie ASP.NET_SessionId mg3mfaisk45zn5y1aql0glbb --cookie .ASPXAUTH FEA3D10032E211EDB330E967D8F19A324A912AD792219CA281451AA809F1B580B25466DAF81DE30DF07252FF13F0888C88ED4DB5871579F1DA3EBAA447CBF860131F6FF00A763C9207CE13BCB143301E49A2B00EEBBF1F4AE14F109DF1BE8D3B39C43478B99E4C686C3849D1D51DDBFA3D2E871691BAB8346FE5195D867F88F662F72E40 http --stop-slow-scripts --redirect-delay 1500 --cookie MOODLEID_ %25E2%25C8%2513E%25BD --cookie ASP.NET_SessionId mg3mfaisk45zn5y1aql0glbb --cookie .ASPXAUTH FEA3D10032E211EDB330E967D8F19A324A912AD792219CA281451AA809F1B580B25466DAF81DE30DF07252FF13F0888C88ED4DB5871579F1DA3EBAA447CBF860131F6FF00A763C9207CE13BCB143301E49A2B00EEBBF1F4AE14F109DF1BE8D3B39C43478B99E4C686C3849D1D51DDBFA3D2E871691BAB8346FE5195D867F88F662F72E40 http://localhost:8404/Relatorio/GeralEstaticoPDF?id=15&pesq_cod=0&IncluirParciais=True&NomesImagens[0]=3fd5b6a2-76a4-470b-af99-93500cc90431.png&NomesImagens[1]=c1c86234-c338-4285-9d25-5069be36a213.png&NomesImagens[2]=4562f9a3-72aa-452c-9736-6d0ba65f59ce.png&NomesImagens[3]=dbc54344-6248-4ee3-9e43-9cb3ef89cc67.png&NomesImagens[4]=8c954917-d572-4d4a-b6fd-2b9cd09e8f8e.png -
I need cookies to save the session.
If I ran this directly on the command line (but instead of a name - instead of a name - ), it will work quickly.
Edit 2
So the problem is, of course, cookies, if I delete them, they execute quickly, but that only gives me a PDF login screen, since it does not save the session.