Initial render slow
If your first HTML-to-PDF render with IronPDF is slow, we may be looking at the following underlying issues:
CEF browser application start-up time
As a result, the initial render may take 2-3 seconds to execute. This is normal start-up time that is similar to the time it takes for Chrome to open on a desktop environment.
- Use IronPdf.Installation.Initialize to initialize IronPDF rendering engines immediately to avoid start-up time on your first render.
- Pre-render a dummy PDF during application start-up (prior to the planned render). This will allow any additional files required for the planned PDF render to already be loaded and waiting. Please remember this start-up overhead only affects the first render job after your application is restarted.
- If initialization is taking more than 5 seconds, the server or PC may be under-provisioned. Be would recommend using a more powerful server or Azure Web app plan (B1 for example).
Chrome browser files are missing from the project, they will be downloaded and installed at run-time.
On render initiation, IronPDF will check to ensure that CEF browser DLLs required to execute are available. Any necessary files not found will be quickly downloaded and applied at runtime.
- In environments with persistent storage (IIS or web apps), SkipInitilization can be used to skip this check.
- Use the IronPdf NuGet package already preloaded with the files specific to your platform/environment. Please see our Advanced Installation Guide for further information.
- Adding Mac, Linux and/or Windows Native NuGet Packages to your project will speed up initialization because native binaries will come pre-installed.
- IronPdf.Slim is the base package for our Chrome Identical rendering engine. Using this package alone may allow the most flexibility but will require more time to initiate as the required files are retrieved from the NuGet CDN.