Rendering Charts in PDFs

When loading charts using JavaScript with IronPDF, it's important to allow sufficient time for JavaScript execution. In the code above, we've enabled JavaScript execution using the enableJavaScript property.

The waitFor property is used to delay the rendering process and wait for the JavaScript to execute. This specific configuration, using WaitForType.JavaScript, will wait until the window.ironpdf.notifyRender function is called in the script or until the maximum wait time is reached.

Additionally, the CSS media option will ensure that the view and layout of the HTML content adheres to the screen settings.