Fixing Render Timeout Issues in IronPDF
IronPDF's default rendering timeout is 60 seconds. If the rendering process does not complete in this duration, a timeout runtime exception will be thrown.
For inputs with heavy image assets or those requiring additional time to render, it is recommended to adjust the RenderDelay duration. This allows the assets to fully render virtually before the PDF is generated. Failure to do so may result in missing assets in the PDF document or even a blank PDF.
To override the default setting, adjust the Timeout duration in the ChromePdfRenderOptions
class and specify the delay duration in the RenderDelay
method via the WaitFor
wrapper object.
Example
// Create a new instance of ChromePdfRenderOptions
ChromePdfRenderOptions renderOptions = new ChromePdfRenderOptions();
// Increase the timeout for the rendering process to 120 seconds
renderOptions.Timeout = 120; // seconds
// Increase the delay before rendering to ensure all assets are fully loaded
renderOptions.WaitFor.RenderDelay(3000); // milliseconds (3 seconds)
// Create a new instance of ChromePdfRenderOptions
ChromePdfRenderOptions renderOptions = new ChromePdfRenderOptions();
// Increase the timeout for the rendering process to 120 seconds
renderOptions.Timeout = 120; // seconds
// Increase the delay before rendering to ensure all assets are fully loaded
renderOptions.WaitFor.RenderDelay(3000); // milliseconds (3 seconds)
' Create a new instance of ChromePdfRenderOptions
Dim renderOptions As New ChromePdfRenderOptions()
' Increase the timeout for the rendering process to 120 seconds
renderOptions.Timeout = 120 ' seconds
' Increase the delay before rendering to ensure all assets are fully loaded
renderOptions.WaitFor.RenderDelay(3000) ' milliseconds (3 seconds)
Check out the below articles for more information about Timeout and RenderDelay.
Timeout
RenderDelay
To make a service request to our engineers, please see: Engineering Request IronPDF.