Skip to main content

Home/ MarketExperts/ Conversion from HTML to PDF is slow
wilova

Conversion from HTML to PDF is slow - 2 views

started by wilova on 22 Nov 22
  • wilova
     
    I'm trying to convert an HTML file which has some tables and no JavaScript using the code below, the conversion time is too much compared with when converting an Excel file to PDF.

    ​HtmlToPdfConverter pdfConverter = new HtmlToPdfConverter(HtmlRenderingEngine.WebKit);

    WebKitConverterSettings sett = new WebKitConverterSettings();

    sett.WebKitPath = @"../../QtBinaries/";

    sett.PdfPageSize = PdfPageSize.A4;

    sett.Margin.All = 15;

    sett.SinglePageLayout = Syncfusion.Pdf.HtmlToPdf.SinglePageLayout.FitHeight;

    sett.WebKitViewPort = new Size(720,0);

    pdfConverter.ConverterSettings = sett;

    PdfDocument pdf = pdfConverter.Convert(@"cb.html");
    Convert Html into pdf
    pdf.Save($@"res.pdf");

    Can there be optimizations for the performance to improve?

To Top

Start a New Topic » « Back to the MarketExperts group