We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

New Version of Webkit dll

Hi,

Can you please provide me Syncfusion.WebKitHtmlConverter.Base dll in the version 15.1460.0.37

Thank you.

Regards,

Indrani



9 Replies

PV Prakash Viswanathan Syncfusion Team April 27, 2017 04:56 AM UTC

Hi Indrani, 
 
Thanks for contacting Syncfusion support. 
 
You can get specific version of WebKit installer from below link,  
  
After installing the WebKit HTML converter use can get assemblies, QtBinaries and samples from the WebKit installed location.  
Example: C:\Program Files (x86) \Syncfusion\WebKitHTMLConverter\15.1.0.37\ 
 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Prakash V 



IG indrani Gajjarapu April 27, 2017 11:24 AM UTC

Hi Prakash,

Thanks for your reply.

I have attached a sample project in which blank pdf is rendered.

Please let me know where I went wrong.

Thank you.

Regards,

Indrani

Attachment: SyncfusionMvcApplication18_5f108de2.7z


PV Prakash Viswanathan Syncfusion Team April 28, 2017 11:26 AM UTC

Hi Indrani, 
 
We have analyzed the provided sample, the provided URL in the convert method is not a valid URL. So, Our WebKit HTML converter generates blank PDF document. We have modified the code snippet to convert the diagram to PDF. Please refer below code snippet, 
 
//Get diagram page URL, 
string url = Request.Url.GetLeftPart(UriPartial.Authority) + "/Diagram/DiagramFeatures"; 
HtmlToPdfResult result = renderer.Convert(url, (int)width, (int)height); 
 
We have attached the modified sample for your reference, 
 
If converter still generates blank PDF document, please try the trouble shooting steps in below link, 
 
Please let us know if you need any further assistance on this. 
 
Regards, 
Prakash V 



IG indrani Gajjarapu April 28, 2017 12:07 PM UTC

Hi,

Is there a way that I can convert the whole diagram into HTML and pass it Convert method so that I can only get the diagram instead of the whole page.

 Also, I have HTML nodes in my diagram unlike in the sample I provided. 

Thank you

Regards,

Indrani


PV Prakash Viswanathan Syncfusion Team April 28, 2017 12:56 PM UTC

Hi Indrani, 
 
We can convert partial Webpage to PDF in WebKit HTML converter by using HTML element ID. We have modified your sample to convert the diagram to PDF.  
//Converting partial Web page to PDF using HTML element ID 
HtmlToPdfResult result = renderer.ConvertPartialHtml(url, "ControlRegion", (int)width, (int)height); 
 
 
Please find the modified sample from below link,  
 
Our WebKit HTML converter preserves the diagram as it is displayed in the web browser, there is no difference between the diagram and output PDF document. We have attached output PDF document and screen shot for your reference. If you are getting any difference from the PDF document and HTML, please provide us the screen shot.  
 
Regards, 
Prakash V 



IG indrani Gajjarapu April 28, 2017 01:40 PM UTC

Hi,

Thank for quick reply.

I am using two-factor authentication. The pdf renders my login screen instead of the actual view. I see why it is doing that. But I need user data to actually populate the page. Is there a way around this??




SK Surya Kumar Syncfusion Team May 1, 2017 10:25 AM UTC

Hi Indrani, 
 
Thanks for the update, 
 
We currently don’t have support for using two-factor authentication, but we do have support for below listed types of authentications. 
 
1.Windows authentication: 
Please find the documentation link for using Windows authentication : 
 
2.Form authentication: 
Please find the below code snippet for using Form authentication: 
            //Initialize HTML to PDF converter 
            HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit); 
 
            //WebKit converter settings 
            WebKitConverterSettings webKitSettings = new WebKitConverterSettings(); 
 
            //Assign the WebKit binaries path 
            webKitSettings.WebKitPath = @"C:\QtBinaries"; 
 
            //Add cookies required for Authentication 
            webKitSettings.Cookies.Add("Key1", "Value1"); 
            webKitSettings.Cookies.Add("Key2", "Value2"); 
 
            webKitSettings.AdditionalDelay = 5000; 
            htmlConverter.ConverterSettings = webKitSettings; 
 
            //Convert url to pdf 
            PdfDocument document = htmlConverter.Convert("http://example.com"); 
 
            //Save and close the document 
            document.Save("Output.pdf"); 
            document.Close(true);  
 
 
Please let us know if you need any further information regarding this. 
 
Regards,
Surya Kumar 



IG indrani Gajjarapu May 11, 2017 12:53 PM UTC

Hi,

Setting the cookies for Form Authentication giving me the login page in pdf again.

public void ExportSeatingPlan()
{
    HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
 
    //WebKit converter settings 
    WebKitConverterSettings webKitSettings = new WebKitConverterSettings();
 
    //Assign the WebKit binaries path 
    webKitSettings.WebKitPath = @"C:/Program Files (x86)/Syncfusion/WebKitHTMLConverter/15.1.0.33/QtBinaries";
 
    //Add cookies required for Authentication 
    webKitSettings.Cookies.Add("UserName""xxx");
    webKitSettings.Cookies.Add("Password""xxx");
 
    webKitSettings.AdditionalDelay = 5000;
    htmlConverter.ConverterSettings = webKitSettings;
    string url = Request.Url.GetLeftPart(UriPartial.Authority) + "/Plan/ViewPlan?PlanId=" + Session["PlanID"] + "&ClassId=" + Session["ClassID"] + "&LayoutId=" + Session["LayoutID"];
    //Convert url to pdf 
    PdfDocument document = htmlConverter.ConvertPartialHtml(url, "LayoutTemplate");
 
    //Save and close the document 
    document.Save("Sample.pdf", HttpContext.ApplicationInstance.Response, HttpReadType.Open);
    document.Close(true);
    System.Diagnostics.Process.Start("Sample.pdf");
 
 
}


PV Prakash Viswanathan Syncfusion Team May 12, 2017 12:40 PM UTC

Hi Indrani, 
 
Thanks for your update. 
 
We can convert form authenticated webpage to PDF using cookies in our WebKit HTML converter, it works fine in our end. Please make sure you are using all the necessary valid cookies to form authenticate in our WebKit HTML converter. If cookies are working in web browser, then it will work in our converter also. 
  
Please follow below steps to get a valid cookie from web browser (Chrome) and check the cookie is working or not in web browser.   
Steps:  
  1. Login to your website in web browser(Chrome).
  2. Menu -> More tools -> Developer tools -> Application -> Cookies -> Website link.
  3. Copy the required cookies from the web browser.
  4. Logout from the website in web browser.
  5. Install the cookie editing extension tool in your web browser.
  6. Then add your cookies using the cookie editing extension in web browser.
  7. Refresh the web page, if web page is logged in (using cookies), then it will work fine in our WebKit HTML converter also.
 
Please refer below screen shot to get cookies from web browser: 
 
 
Please let us know if you need further assistance on this. 
 
Regards, 
Prakash V 


Loader.
Live Chat Icon For mobile
Up arrow icon