Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf ConvertUrl HTTP status Options
Vidar Madsen
Posted: Wednesday, June 28, 2017 9:50:09 AM
Rank: Newbie
Groups: Member

Joined: 5/10/2016
Posts: 1
Is there any way of accessing the HTTP status when using ConvertUrl? We need this to detect 500 errors or similar, so that the PDF conversion can fail in stead of creating a PDF of the error message.
eo_support
Posted: Wednesday, June 28, 2017 10:12:31 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,071
Hi,

Yes. You will need to use this method:

https://www.essentialobjects.com/doc/eo.pdf.htmltopdfsession.runwebviewcallback.aspx

Note the LoadRequestAndWait method in the sample code. You can change it to LoadUrlAndWait. Both methods returns a NavigationTask object. You can then use this property to check the HTTP status code:

https://www.essentialobjects.com/doc/eo.webbrowser.navigationtask.httpstatuscode.aspx

Hope this helps. Please feel free to let us know if you still have any questions.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.