Welcome Guest Search | Active Topics | Sign In | Register

HtmlToPdf Authentication Options
Danail Aleksiev
Posted: Monday, July 16, 2018 10:36:06 AM
Rank: Newbie
Groups: Member

Joined: 7/16/2018
Posts: 2
Hello guys,

The application I am working on has single sign-on with OAuth(implemented with IdentityServer4 for .NET Core 1.1.2).

I am trying to use HtmlToPdf.ConvertUrl("http://local.exporter/", "c:\\Foo.pdf"); method.

The request is made from the client("http://local.client/") to the exporter("http://local.exporter/"), that uses the same credentials to log-in. Is there a way to set the request headers(Authorization: Bearer ....), or there is some other way of using EO with such type of authentication? Please let me know if you need some additional information.

Thanks.
eo_support
Posted: Monday, July 16, 2018 7:22:40 PM
Rank: Administration
Groups: Administration

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

Yes. You will need to use this method:

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

You can take a look of the sample code in the remark section to see how to set additional headers.

Thanks!
Danail Aleksiev
Posted: Tuesday, July 17, 2018 2:15:37 AM
Rank: Newbie
Groups: Member

Joined: 7/16/2018
Posts: 2
Thanks a lot, guys. Worked like a charm!
eo_support
Posted: Tuesday, July 17, 2018 9:41:22 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Great. Glad to hear that it works!


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.