Comment by layer8
For low-level work, qpdf can be quite useful: https://github.com/qpdf/qpdf
For low-level work, qpdf can be quite useful: https://github.com/qpdf/qpdf
How do you use qpdf for extraction when its README states “qpdf does not render PDFs or perform text extraction, and it does not contain higher-level interfaces for working with page contents.”
Came here to say this. Qpdf is my go-to for manipulating pdf files on the command line. Encrypting, decrypting, extracting and merging pages.
It's Apache-licensed and written in C++.