codaxy / wkhtmltopdf

C# wrapper around excellent wkhtmltopdf console utility.
265 stars 92 forks source link

Timeout on > 5 pdf pages #8

Closed JonathanPinney closed 9 years ago

JonathanPinney commented 9 years ago

I'm able to convert between 1 and 5 pages with no issue, but once I test with generating 6 pages, the Process times out. Below is arguments string sent with the ProcessStartInfo. I've tried with 32 and 64 bit with no luck. I'm able to use the same argument in command line with no issue.

--page-size LETTER
--footer-html http://localhost/TEMPFOLDERs/TEMPFOLDERFooter.aspx
margin-bottom 25 --footer-spacing 5
http://localhost/TEMPFOLDERs/TEMPFOLDER.aspx?p=275013 
http://localhost/TEMPFOLDERs/TEMPFOLDER.aspx?p=275023
http://localhost/TEMPFOLDERs/TEMPFOLDER.aspx?p=275029
http://localhost/TEMPFOLDERs/TEMPFOLDER.aspx?p=275030
http://localhost/TEMPFOLDERs/TEMPFOLDER.aspx?p=275032
http://localhost/TEMPFOLDERs/TEMPFOLDER.aspx?p=275033
C:\\Users\\Me\\Documents\\Projects\\APPLICATION\\TEMPFOLDERs\\Generated\\owg2vwvl.dzw\\ABC_Healthcare.pdf
mstijak commented 9 years ago

@JonathanPinney: Have you figured out what was the problem?

JonathanPinney commented 9 years ago

How I was rendering the html pages was... inefficient. This was causing the Process to timeout and throw the exception. I refactored the html page to be converted and am able to create over 100 PDF pages in just a couple seconds now.