https://github.com/tesseract-ocr/tesseract/wiki/Command-Line...
It's not quite what you want, but I think you could probably filter the output based on the selected region and pretty quickly get what you want.
It is opensource and runs on Java.You can also extract the areas of interest in the pdf and run it via cmdline[1].You can get more details if required on my blog[2]
[1]https://github.com/tabulapdf/tabula-java/wiki/Using-the-comm...
Not sure if it only reads at those coordinates vs. OCRing the whole thing (for example if you were legally prohibited from OCRing content outside a certain coordinate space), but it is selectable.
There's a very popular and minimalist CLI called scrot that I think would be ideal... well scratch that, I made a search and our question has already been asked and answered:
https://askubuntu.com/questions/280475/how-can-instantaneous...
https://stackoverflow.com/questions/21497447/ocr-on-a-screen...
The goal is to draw a box using GUI, then use those coordinates to extract text from several homogeneous pages.
I also have a different goal of trying to interpret structure of a PDF that has visual structure (headers, sections and subsections all numbered). But that seems to lend itself to some sort of text parsing.
Some reading here: https://stackoverflow.com/questions/53219016/detecting-secti...
Here's how to extract text from a PDF based on coordinates (this explains how to do it on web, but it's also possible using other platforms):
https://groups.google.com/d/msg/pdfnet-webviewer/h2W3VksbQUI...
Here's how to extract a PDF's logical structure:
https://www.pdftron.com/documentation/samples/#logicalstruct...