When converting from HTML to PDF, the performance is low and the conversion time is relatively long

           //Initialize HTML to PDF converter.

            HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();

            //BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();

            //Set Blink binaries path.

            //blinkConverterSettings.BlinkPath = @"BlinkBinaries/";

            //Assign Blink converter settings to HTML converter.

            //blinkConverterSettings.Orientation = Syncfusion.Pdf.PdfPageOrientation.Portrait;

            //htmlConverter.ConverterSettings = blinkConverterSettings;

            //Convert URL to PDF document.

            PdfDocument document = htmlConverter.Convert(textBox1.Text, String.Empty);

            //Create file stream to save the PDF document.

            FileStream fileStream = new FileStream("PDF.pdf", FileMode.OpenOrCreate, FileAccess.ReadWrite);

            //Save and close the PDF document.

            document.Save(fileStream);

            document.Close(true);

            fileStream.Close();

            System.Diagnostics.Process.Start("PDF.pdf");


1 Reply

KS Karmegam Seerangan Syncfusion Team December 1, 2023 03:30 PM UTC

Hi Chenlining,


We have checked the reported issue with provided details on our end. We did not face any performance-related issues. However, we have attached the sample for your reference.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Windows_Forms740273011

Kindly try the sample and let us know the result. If still you are facing issues, we kindly request you to share the code snippet, input URL/HTML, and environment details (OS, RAM size, bit version, and culture settings),  to check this on our end. So that will be helpful for us to analyze and assist you further on this.


Regards,

Karmegam


Loader.
Up arrow icon