Input: sample-receipt.pdf
content
scratch_dir="$(mktemp -d)"
trap 'rm -rf "$scratch_dir"' EXIT
./bin/pdfcpu_0.14.0_Linux_x86_64/pdfcpu extract -m content "sample-receipt.pdf" "$scratch_dir"
cat "$scratch_dir"/*_Content_page_*.txt >"sample-receipt--pdfcpu-go--content.txt"
rm -rf "$scratch_dir"
trap - EXITOutput: sample-receipt--pdfcpu-go--content.txt
Loading preview…