Hacker News new | ask | show | jobs
by bionade24 786 days ago
Does someone know a tool that is sed- or awk-like for PDFs?
3 comments

Qpdf has tools that go in that direction (but not a flat text format that allows arbitrary edits).

https://qpdf.readthedocs.io/en/stable/qdf.html#qdf

Perhaps you can use lesspipe with sed/awk?

https://github.com/wofr06/lesspipe

pdftk is a CLI tool that can extract and edit PDF metadata such as tables of contents*, if that's what you mean?

*(Table of contents? Tables of content?)