Experimental source-backed text editing prototype in PDF.js #21293
RabbitHols
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi PDF.js maintainers,
I have been experimenting with native text editing directly outside and inside PDF.js, and I wanted to share the prototype to ask whether this direction is interesting or compatible with the project architecture.
Demo:
https://rewirepdf.com/web/viewer.html?file=/web/demo/tracemonkey.pdf
Fork:
https://github.com/RabbitHols/pdf.js
The prototype tries to edit PDF text from the actual PDF content stream instead of drawing a visual overlay on top of the page.
The current scope is intentionally narrow:
tracemonkey.pdfThe rough architecture is:
I know this is far from a complete PDF edit feature, especially for complex layouts, font encodings, multi-column documents, and reflow. My goal right now is to explore whether PDF.js could expose enough source/layout information to support real edits safely, rather than overlay-based editing.
I’d love feedback on:
Thanks!
All reactions