AI OnAI Off
No luck with that. I am getting the 'Error: Failed loading page http://http//localhost:12345testpage/ (sometiems it will work just to ignore this error with load-error-handling ignore)
Exit with code 1 due to network error: HostNotFoundError'
The url seems to be wrong. We can't have two http and there is no slash after the port number and pagetype.
Ah.
Instead of using .GetVirtualPath, use
GetUrl(new UrlBuilder(contentLink), ContextMode.Default);
I want the html page(content and images) to be converted to pdf.
My view is as below:
Download UrlAsPDF
and the controller as below:
[HttpGet]();
public ActionResult UrlAsPDF(ContentReference contentLink)
{
var url = ServiceLocator.Current.GetInstance
var pageUrl = url.GetVirtualPath(contentLink);
return new UrlAsPdf(pageUrl.ToString())
{
FileName = "test.pdf"
};
}
I could see the link on my page, when I clicked on it,
I am getting the error as:
Error: Failed loading page http://http//localhost:12345System.Web.Routing.VirtualPathData (sometimes it will work just to ignore this error with --load-error-handling ignore)
Exit with code 1 due to network error: HostNotFoundError
I am running this on my local machine. Are there any other settings I need to look into. the url(http://http//localhost:12345System.Web.Routing.VirtualPathData) seems to be incorrect.