I have changed the code to encode the HTML directly within the initial request, thus the second request should not be required. I’ll let you know if this solves the problem.
The request is firing back into the same application (to get the HTML version of the page I’m converting into a PDF).
Interestingly there is no sign of any other requests in the thread dump apart from the initial user requests for PDFs. So it looks like the request from the PDF conversion isn’t making it back to the application.
This either means that the request isn’t getting out (or back in) from the PD4ML component, or perhaps the system is somehow locked up with all the initial user requests that the resultant HTML requests can’t get in. This may also explain the fact that this issue is intermittent.