Rank: Advanced Member Groups: Member
Joined: 9/3/2014 Posts: 68
|
Hi,
I would like to load a virtual page (no physical url) using webView.LoadHtml(htmlContent). However, this HTML content has .js and .css references as relative links, for example <script src="jquery.js"></script>
Those js/css references will not load as the web view does not load a real url, then it does not know where to get those files. I don't want to set the absolute link, for example <script src="http://code.jquery.com/jquery.js"></script>, because I don't want to put the whole link on the code.
How to set the web view to run under a certain domain (http://code.jquery.com/ in this example) without actual load it? So webView.LoadHtml(htmlContent) will load all needed external resources.
Thank you.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You would need to set HtmlToPdf.Options.BaseUrl for that. At runtime, EO.Pdf combines this BaseUrl value with the partial Url in your page to form the full Url.
Thanks!
|
Rank: Advanced Member Groups: Member
Joined: 9/3/2014 Posts: 68
|
Thank you for your reply. My question is for EO.WebBrowser, not for EO.Pdf
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
|
Rank: Advanced Member Groups: Member
Joined: 9/3/2014 Posts: 68
|
Custom resource handler does help. Thank you.
|