Differences in rendered HTML and converted PDF

This is what the browser is currently rendering:



This is my converted PDF

As you can see when converting to pdf the datepicker component is detached from the html element.

This is my code, i have tried to export it as image or as pdf and the result is the same.

                HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);
                WebKitConverterSettings settings = new WebKitConverterSettings();

                settings.WebKitPath = @"C:\Users\oramos\Desktop\ScreenShooter\packages\Syncfusion.HtmlToPdfConverter.QtWebKit.WinForms.17.4.0.46\lib\QtBinaries";
                settings.HtmlEncoding = Encoding.UTF8;

                htmlConverter.ConverterSettings = settings;

                //Convert HTML string to PDF
                PdfDocument document = htmlConverter.Convert(htmlText, baseUrl);
                Image[] image = htmlConverter.ConvertToImage(htmlText, baseUrl);

                image[0].Save(baseUrl+"Sample.jpg");


                //Save and close the PDF document 
                document.Save(baseUrl + "Output.pdf");


1 Reply

GK Gowthamraj Kumar Syncfusion Team March 16, 2020 10:34 AM UTC

Hi Oscar, 

Thank you for using Syncfusion products. 

We have tried to reproduce the reported preservation issue, but the date picker component is preserved properly in the output PDF document. We have shared the sample and output document for your reference and the date picker preservation issue is not reproduced in our end. Please try the below sample in your end and let me know the result.   

However, could you please provide more details to reproduce the issue such as complete input HTML file/URL (with resource style, scripts, etc.,), complete code snippet, product version and environment details (OS, bit version, culture settings, RAM size, CPU core size, etc.,) to reproduce the issue in our end. So, that it will be helpful for us to analyze and assist you further with this.    
 
Regards, 
Gowthamraj K 


Loader.
Up arrow icon