We render PDF pages using PDFium and retrieve images based on the current zoom level to maintain image quality. However, at higher zoom levels (200%, 300%, 400%, and above), PDFium takes a considerable amount of time to generate and return the image data.
We would like to understand whether this is expected behavior and whether there are any recommended approaches for improving rendering performance.
Reproduction Steps
1. Run the attached sample. Performance.zip
2. Load the PDF document by clicking the Choose File Option. jp2-scan-1page.pdf
3. Click "Render Page - 100% Zoom" and observe the rendering time in the browser console.
4. Repeat the test for:
○ 200% Zoom
○ 300% Zoom
○ 400% Zoom
5. Compare the image retrieval/rendering times for each zoom level.
Questions
1. Does PDFium provide any recommended approach for improving image retrieval performance?
2. Is there a more efficient way to generate high-resolution images while maintaining image quality?