VS Code Marketplace · Open VSX Registry
An extension for Visual Studio Code and Open VSX-based editors (such as Cursor), which displays the word count of PDF documents in the status bar, along with more detailed statistics about a PDF (file size, page count, character count, etc.) in the status bar tooltip upon hover.
Word count of a PDF displayed in the status bar
PDF statistics displayed in the status bar tooltip upon hover
Feel free to report any bugs or feature requests as issues on GitHub. Pull requests are also welcome!
The extension uses pdf.js to pull positioned text items from each page of a PDF document, then converts these into a block of continuous text by inserting spaces where the horizontal gap between items is large relative to the font height, starting a new line when the vertical position changes or an item reports an end of line. Words split by a hyphen at a line break are rejoined, so they don't get counted as separate words. The word count is then calculated as the number of whitespace-separated tokens in the resulting text, excluding any tokens that are just made up of punctuation.
...
Adds retries for attempting word count again when it fails (for example, during LaTeX compilation).
Fixes an issue where the word count was still displayed in the status bar when a non-PDF tab was active.
First full release of pdf-word-count. Adds page count, file size, and words per page stats to the status bar tooltip, along with styling improvements and improved documentation.
Add pdfjs bundling to avoid extension import issue, expand the test suite to improve the extension robustness.
Add Open VSX deployment and update extension description and notes.
Initial release of pdf-word-count, a lightweight extension that displays the word count of PDF documents in the status bar. Only deployed to the VS Code Marketplace in this initial pre-release.

