4 ms·
I'm surprised pdf.js isn't discussed often as an API for reading data from PDF files. It allows you to get raw access to the text but also the visual rendering
by burtonator 8y ago
I'm surprised pdf.js isn't discussed often as an API for reading data from PDF files.
It allows you to get raw access to the text but also the visual rendering of the PDF.
The only downside is that it uses the browser to do this but you could use chrome headless to make this into an API.
I ended up building this:
https://github.com/burtonator/pdf-annotation-exporter https://github.com/burtonator/pdf-annotation-exporter
based on that strategy to export PDF annotations.
It ended up evolving to a full PDF and document management system for Electron
https://getpolarized.io/ https://getpolarized.io/
... but the nice thing is that even if Polar is a GUI app I can do things with PDF.js in the future like uploading them to a search infrastructure.
- deleted 8y ago[deleted]
- scrollaway 8y ago> The only downside is that it uses the browser to do this but you could use chrome headless to make this into an API Huh? Doesn't pdf.js have the capability to run headless? What in the browser does it depend on? Anyway using that in Python is never going to be easy or useful. There's already good PDF tooling in Python.