We have some code that uses a third party component to generate a PDF from a URL that we pass it (the URL being a page within our application). In the code, we instantiate the PDF generator and it creates the PDF in an asynchronous fashion.
The problem I have is that if the URL that we pass it has a problem, there is no indication of this from the PDF generator, we just get a PDF created that contains a 404 error page, or our custom error page.
I need some way, within my controller, to first call this URL (which is another view) and check that it does not error out, prior to calling the PDF generation. Can anybody point me in the direction of how I might go about doing this?