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");
pdf.Save($@"res.pdf");
Can there be optimizations for the performance to improve?
I have several autogenerated HTML files to convert to PDF, is there a way to make the process faster, possibly by loading the browser and the conversion process once until all the HTML files are converted?
Ok. Please, how do I fit the webpage to a single page, such that if the height is greater than A4, it should be fit to a page?
Few autogenerated HTML records to change over to PDF, is there a method for making the interaction quicker, potentially by stacking the program and the transformation cycle once until all the HTML documents are changed over?
Hi sb captures,
Our HTML to PDF converter library internally using QtWebKit and Blink rendering engine for converting HTML to PDF. We already have best performance for converting HTML to PDF. As we said earlier in this thread, all the conversion will be performed in unique internal process.
If you are facing any issues in HTML to PDF conversion, kindly share us the complete code snippet, product version, input HTML file or URL. It will be helpful for us to analyse and assist you further on this.
Regards,
Prakash V
Hey Parkash, Thanks for your response; however, this issue I'm facing is not with mypcfile it might be something else!