Only for JavaScript developers
Hey buddy, I know the pain when you need to add document parsing to a JavaScript project. You start looking for one package for PDF, another for DOCX, something else for XLSX, another for CSV, and then you have multiple dependencies to manage. Everything works locally and then something fails during deployment, some package needs an extra setup, some dependency asks for a test.pdf, and a simple document parsing task becomes a headache.
That’s why I built pageslice.
Pageslice is also built on top of libraries like mammoth and pdf-parse, just like Next.js is built on top of React. The idea is not to reinvent everything but to bring the pieces together and give JavaScript developers one simple package to work with.
With pageslice you can handle PDF, CSV, XLSX, DOCX and TXT from one place instead of installing and configuring different packages for every format.
Get evolveyourself’s stories in your inbox
Join Medium for free to get updates from this writer.
And if you want to use AI for extraction, you can BYOK and use your own API key. You don’t have to manually create another file just to take the extracted text, send it to an LLM, write the prompt, handle the response and then validate the output. Pageslice has built-in prompts and Zod-based schema validation so you can directly focus on what data you actually want to extract.
I don’t want to write a huge post explaining every feature because I know you’ll probably go to the README and check it yourself anyway.
https://www.npmjs.com/package/pageslice?activeTab=readme
As a JavaScript developer, I just wanted to keep the whole thing simple. Install it, plug it into your project and get the job done.
We also welcome contributors because pageslice is still evolving. OCR is something we’re working towards, along with built-in schema templates for common document extraction use cases.
If you’re a JavaScript/TypeScript developer working with documents, give pageslice a try.
Thanks.





