4 ms·
This is really neat! For work, I've found myself from time to time exploring the tech around PDFs. I find this tech strangely fascinating. It's like a shim on t
by adelevie 11y ago
This is really neat! For work, I've found myself from time to time exploring the tech around PDFs. I find this tech strangely fascinating. It's like a shim on top of something old and ugly that enables integration with much more modern systems.
Some quick feedback (and a shameless plug):
The CLI interface should output JSON. It would be nice to combin with a CLI JSON parser such as jq[0].
Shameless plug: I've been working on a PDF CLI aimed at making it easier to programmatically fill out PDF forms: https://github.com/adelevie/pdfq https://github.com/adelevie/pdfq. It provides an interface and some wrappers on top of the main pdf form-filling tool, pdftk. For example, you can get json out of a pdf form like this:
pdftk hello.pdf dump_data_fields | pdfq
Or you can generate FDF from a json file:
cat hello.json | pdfq json_to_fdf
You can also fill a pdf without touching an fdf code:
pdfq set foo bar input.pdf output.pdf
[0] https://stedolan.github.io/jq/ https://stedolan.github.io/jq/
- metachris 11y agopdfx will output json if you use the -j flag! pdfx -j <file-or-url.pdf> jq looks neat btw.
- adelevie 11y agoI should have read the [] manual :)
- PaulHoule 11y agoPDF is less proprietary than most people think. It is an ISO standard after all and it is a bit complicated but it does solve the problem of making "printable" documents produced by all sorts of tools available online.