Created
May 25, 2017 07:21
-
-
Save tenomoto/8b740d699d46a71f4f01ddff2e31a619 to your computer and use it in GitHub Desktop.
Find and move PDF files without embedded fonts
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/sh | |
if [ ! -d pdf ]; then | |
echo "put PDF in pdf" | |
fi | |
if [ ! -d pdf_not_embedded ]; then | |
mkdir pdf_not_embedded | |
fi | |
cd pdf | |
for f in *.pdf; do | |
isEmb=`pdffonts ${f} | awk '$4=="no" {print "no"}'` | |
if [ "${isEmb}" ]; then | |
echo ${f} | |
mv ${f} ../pdf_not_embedded/ | |
fi | |
done | |
cd ${OLDPWD} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment