This tool allows you to inspect the tree structure of a PDF file. It is built using the Mozilla PDF.js library. I made a fork of the project and extracted only the core part of it and published it as separate npm package pdf.js-core
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.