How to edit PDF in React application?
reactjs - How to modify an existing PDF in React.js? - Stack Overflow
I built a wrapper to easily embed my PDF editor (SimplePDF) in any React app!
PDF editing - client side with canvas or on server?
Videos
I'm working on a React project where I want to upload a PDF file in the frontend, display it, and allow users to edit the text content.
I have for now implemented file upload and display using PDF.js, but now I need a way to edit the existing text (not just annotate).
By editing I mean:
-
Changing existing text
-
Adding new text
-
Removing text
-
Highlighting/marking text
What is the best approach to truly edit the text inside a PDF in React? Should I convert the PDF to another format first, or is there a direct way to modify text layers?
Any guidance or library recommendations would be appreciated!
I've looked into pdf-lib, but it seems to only allow adding new text, not modifying existing text.
» npm install react-pdf
» npm install @react-pdf/renderer