Yes. You can follow these steps:
1. Call WebView.GetHtml() to get the current page HTML;
2. Call WebView.EvalScript("document.URL") to get the current page Url;
3. Get the base Url of the Url you get on step 2. The code will be something like this:
Code: C#
//"Normalize" the Url
Uri uri = new Uri(full_url);
string baseUrl = string.Format("{0}://{1}{2}",
uri.Scheme, uri.Authority, uri.AbsolutePath);
if (baseUrl.LastIndexOf("/") ==
baseUrl.LastIndexOf("://") + 2)
baseUrl = baseUrl + "/";
//Now remove the page part
int nPos = baseUrl.LastIndexOf("/");
baseUrl = baseUrl.Substring(0, nPos + 1);
4. Set HtmlToPdf.Options.BaseUrl to the base Url value you get in step 3:
Code: C#
HtmlToPdf.Options.BaseUrl = baseUrl;
5. Call HtmlToPdf.ConvertHtml with the HTML you get on step 1:
Code: C#
//Convert HTML to a PDF file
HtmlToPdf.ConvertHtml(html, your_pdf_file_name);
This will produce a PDF file based on your current HTML. Alternatively, you can do:
Code: C#
//Convert HTML to a PdfDocument object
PdfDocument doc = new PdfDocument();
HtmlToPdf.ConvertHtml(html, doc);
This will produce a PdfDocument object, which you can use it for other purpose: for example, you can save it into a MemoryStream to get a byte array, then email the byte array as an attachment; Or you can add another "cover page" to it before you finally save it as a file, etc. You can take a look of the EO.Pdf samples to see all the features available there.
Hope this helps. Please feel free to let us know if there is anything else.
Thanks!