|
Rank: Member Groups: Member
Joined: 2/24/2011 Posts: 25
|
Hello.
Is possible to set BaseUrl to a ASHX image handler instead of a physical directory ?
Any short example ?
I try to set baseurl to same folder of ASHX handler, but image do not show, eo.PDF works with ASHX´s ?
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
BaseUrl is a HTML concept, not an ASP.NET concept. So it has nothing to do your ASHX. Whatever you do as soon as it works in your browser it should work with EO.Pdf.
Thanks
|
|
Rank: Member Groups: Member
Joined: 2/24/2011 Posts: 25
|
Hello.
Thanks for reply.
The handler works fine with browser, but htmltopdf do not working with the same ASHX handler. I using this:
<img src="/generichandler.ashx?PictureID=1">
Its show in browser, but not on htmltopdf.ConvertHtml.
When i set:
<img src="/img/img1.jpg">
Its works in browser.
But when i use the same src in htmltopdf, i also need set the BaseUrl property to work with htmltopdf.
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
It will work as soon as your set your BaseUrl correctly. To figure out the correct BaseUrl, save your page output into a regular HTML file, place that file into a separate folder unrelated to its original location, then add <base> element into your HTML file's header section. Once you get that working, use the same BaseUrl for HTML to PDF and it will work.
Alternatively, you can use ASPXToPDF control. That control will automatically set BaseUrl for you. Make sure you update to the latest build for both EO.Web and EO.Pdf if you useASPXToPDF.
Thanks
|
|
Rank: Advanced Member Groups: Member
Joined: 6/13/2012 Posts: 55
|
I'm having the same issue - was this ever resolved? It's definitely pulling the full url https://domain.com/logo.aspxideas? Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 6/13/2012 Posts: 55
|
Disregard the last post - images via ashx work just fine. It was a security issue.
|
|