PDFQuery is a lightweight Python library for scraping data from PDFs using JQuery-like CSS selectors or XPath expressions. It wraps pdfminer and lxml to provide a concise API for extracting text, tables, and layouts. Version 0.4.3 is the latest, with no active development since 2016.
pip install pdfqueryVerified import paths — ran on the pinned version, not inferred.
Load a PDF and extract text lines using JQuery-like selectors via pyquery.
Uninstall old pdfminer: pip uninstall pdfminer; ensure pdfminer.six is installed.
Test with your Python version; if issues arise, switch to pdfplumber or pypdf.
Use exact case: LTTextLineHorizontal, LTTextBox, etc.