klippa-app/pdfium-cli

Feature req: option to get pdf as JSON

Closed this issue · 3 comments

It would be really helpful to get pdf info in JSON format.

pdfium-cli info ./test.pdf --output-type json

Any specific reason for not using the same API for info as for other commands, i.e. pdfium-cli command input output flags

info has no output argument, I suppose you could say that output defaults to ´-´, i.e. stdout. As of now I need to treat info as a special case and not add an extra dash in order to avoid error.

One of the greatest things with pdfium compared to Poppler is the API. It's a joy to work with a consisten API instead of using a bunch of separate utilities with different APIs. I think it's worth nailing the consistency as close to 100% as possible while the project still is young.

image

It's because these commands were not really created to output to a file, but it makes sense to have it, will add.

The file output has been added in #11