'Partially re-render PDF in React

I'm trying to achieve the following:

  1. Overlay some text on top of a PDF
  2. Edit that text using an input field (outside the PDF)
  3. Update the PDF in real-time, without re-loading the entire PDF, i.e. a partial re-render

I've built a demo showing what I'm trying to achieve - this reloads the entire PDF when you type in the input.

https://react-pdf-demo.vercel.app

My question is: is this feasible? If so, how can I achieve it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source