This is great, thanks for sharing!<p>It is also inspiring to me, because I have had the same idea and been working on something like this on-and-off since early 2022, but the contrast between your project and the state of mine[1] is like a textbook example of how to ship vs how not to ship:<p>• Instead of using an existing parser like pdf.js as you do, I started writing my own parser from scratch, in the process learning Rust and its Nom library for parsing, its integration with Webassembly, etc.<p>• I wrote not just a straightforward parser, but a crazy one that that preserves all the details like whitespace etc (what a typical parser is supposed to ignore), so that I can test whether it round-trips successfully.<p>• After I got it working, I didn't stop at "works on almost all PDFs in practice" (the same as with PDF.js or any other PDF implementation) but actually chased down and investigated every single failure, checking whether they work in any other PDF application/library (Preview, Chrome, qpdf, Adobe Reader, etc), until I could prove to my satisfaction that it's not a fault in the parser. (This is still not complete…)<p>• When I returned to this project again after several months, instead of making further progress I spent time starting to document the code, making minor improvements and tweaks, etc.<p>So the end result is that my project basically does nothing still, while you have a working PDF debugger. :) This is the difference between a project that intends to actually produce something and one that ends up being mostly for learning/fun with the goal mostly forgotten… not that I have any regrets :)<p>[Meta: Something similar is true of this comment too, which I started two days ago but left as a draft… until I finally had a burst of energy and posted just now.]<p>Returning to your project, a couple of feature requests:<p>- Provide a shortcut to jump directly to the node for page N, for any user-provided page number N.<p>- (Where possible) Some annotation of the page content stream operators — the Tj, Td, etc.<p>(Do consider making it an open-source project, whatever the quality of the code…)<p>[1]: <a href="https://github.com/shreevatsa/pdf-explorer">https://github.com/shreevatsa/pdf-explorer</a> / <a href="https://shreevatsa.net/pdf-explorer/" rel="nofollow noreferrer">https://shreevatsa.net/pdf-explorer/</a>