The PDFViewer exposes three events allowing you to customize the default rendering of its nested components:
- onRenderToolbar—Allows you to add custom tools inside the toolbar.
- onRenderContent—Allows the customization of the content layout.
- onRenderLoader—Allows the customization of the loader's look and feel.
The following example showcases how to add a custom tool to the PDFViewer toolbar by keeping some of the built-in tools at the same time. For this purpose, collect all built-in tools available in the
onRenderToolbar event arguments, and then return only the desired ones and a custom Mark as read button.
The PDFViewer allows you to customize the loaded content by overwriting the result returned by the onRenderContent event. In this example, you will see how to add a red border to the element that wraps the loaded PDF document.
To change the default rendering of the loader that appears while the PDF document is loading, use the onRenderLoader event of the PDFViewer. Below you can see how to apply custom styling to the default