Extract text from a born-digital PDF
A born-digital PDF already contains the words. Pith reads them and returns citation-ready chunks: the page, the heading in force, and the box on the page.
When the file already has text
The characters are in the file. Pith puts them in reading order, drops a header or footer that repeats, and keeps a ruled table as one chunk. Cells in a row are joined with a vertical bar.
When the page is a scan
A page with no text layer comes back as deferred. If that page is an image, OCR fills the line later. The first response does not wait for that work. A scan is the slow path. A digital file is the one Pith is built for.
What a citation can use
- page starts at 0.
- path lists the headings in force, outer heading first.
- left, bottom, right, and top are PDF points. The origin is the bottom-left of the page.