Code
Resolution
Control the sharpness and quality of the PDF rendering
Loading...
Usage
Using the resolution prop
Using the usePdf hook
Remember to use the usePdf hook inside the Root component.
Features
- Control the sharpness and quality of the PDF rendering at the cost of heavier rendering tasks.
- 1 is the fastest render (but the lowest quality)
- 4 is the slowest render (but the highest quality)
- Configurable through the
resolutionprop on theRootcomponent or theusePdfhook - Limited values from 1 to 4 to avoid freezing the browser.
Best Practices
- Use 2 as a default value for the
resolutionprop. It's a good balance between speed and quality. - For mobile devices, do not use a value higher than 2.
