Created
November 6, 2020 15:37
-
-
Save tavy315/c6ee17bfa8748faa8d37ab862c03ec5c to your computer and use it in GitHub Desktop.
validate PDF files using pdfcpu (https://github.com/pdfcpu/pdfcpu)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find . -name "*.pdf" -print0 | while read -d $'\0' file | |
do | |
/usr/bin/pdfcpu validate -q "$file" &> /dev/null | |
if [ $? == "1" ]; then | |
((if++)) | |
echo "$if) $file PDF file is invalid." | |
else | |
echo "." | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment