a9ca6e0857
Use stdout redirection scripts for pdfinfo and, on Windows, a script to run pdftotext hidden, which together allow for all unmodified binaries (including, probably, symlinked system ones, though I didn't test that). On Windows, using a .vbs does cause a brief wait cursor. The stock pdfinfo needs the redirection script anyway, so that's unavoidable, but on the async branch I think we'll be able to switch to pdf.js for the page count, at which point maybe I'll try to remember how I modified the Windows binaries to be hidden and use a modified version of pdftotext to avoid VBScript. (We use the stock pdftotext elsewhere already.)
6 lines
135 B
Bash
6 lines
135 B
Bash
#!/bin/sh
|
|
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
|
|
echo "Usage: $0 cmd source output.txt"
|
|
exit 1
|
|
fi
|
|
"$1" "$2" > "$3"
|