Sicos1977 / ChromiumHtmlToPdf

Convert HTML to PDF with a Chromium based browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Best way to improve performance?

davidp-silva opened this issue · comments

Best way to improve performance?

Hello everyone, is there any way that I can reuse the same chrome to generate the PDF and thereby improve performance?

I'm currently doing it like this:

image

Thank you!!!

commented

Just make the Convert "global" and keep calling the ConvertToPdf method. It will then re-use the exesting Chrome instance.

Only destroy the Converter object when your done with all your conversions.

It also will not matter if for some reason the Chrome instance get closed, it will detect that and just spin up a new Chrome instance.