Example: flexible command line export using paperwork-json, jq & ImageMagick

I searched for a possibility to create a pdf with exactly the edited image files (no explicit page format, for example). And this is what I finally used… it can serve as an example for more use cases by changing the jq and/or convert parameters:

paperwork-json show 20220202_1125_25 | jq '.pages[].image'  | convert @- ~/tmp/x.pdf

Explanation of the command line

  1. paperwork-json: export document info as json
  2. jq: generate a list of image files for this document in the correct order
  3. convert read file list from stdin (using @-) and output as pdf

References

1 Like