How can you render pages in separate React components and have a PDFFindController at the same time? #17991
Unanswered
JasonIsHydrated
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I load and render all pages of a PDF file in individual React components and still maintain a search function across all pages?
Hi, I am trying to create my own pdf-viewer with pdf.js as core library and Vite, ReactJS as framework.
This viewer is meant to render PDFs with 1000+ pages efficiently, which works well through the react-window library.
This works according to the following scheme:
I manage to implement a search function when I render all pages in one component
For this I followed the "simpleviewer" example.
I also managed to load the pages in individual components by fetching and rendering the pages individually with pdf.getPage(n) as shown here.
I also want to mention, that I have read many issue reports about the SinglePageViewer, RenderingQueues and PageViewer, which did not help me with my problem.
TLDR:
How can I retrieve individual pages from the PDFViewer and render them in separate components and still have a search function?
SinglePageViewer, PageViewer or RenderingQueues do not seem to have helped
Attachments and Configurations
Attach (recommended) or Link to PDF file here:
https://api.printnode.com/static/test/pdf/multipage.pdf (dummy pdf)
Configuration:
Beta Was this translation helpful? Give feedback.
All reactions