Created
October 20, 2017 02:52
-
-
Save wyfinger/7b210ff069a605c24fb7774f347006d3 to your computer and use it in GitHub Desktop.
Mass check pdf files for Text layer by pdftotext.exe from Poppler
This file contains 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
@ECHO OFF | |
SET filelist=pdflist.txt | |
SET textfile=c:\PDF\text.txt | |
SET outfile=pdfcheck.txt | |
rem delete results log | |
del /Q %outfile% | |
rem check files to text layer in loop | |
FOR /F "tokens=* usebackq" %%I IN ("%filelist%") DO ( | |
if exist %textfile% ( | |
del /Q %textfile% | |
) | |
rem pause | |
pdftotext -q "%%I" %textfile% | |
rem pause | |
FOR /F "usebackq" %%A IN ('%textfile%') DO ( | |
rem echo %%~zA | |
rem pause | |
if %%~zA GTR 50 ( | |
echo TEXT EXISTS [%%~zA] %%I | |
) else ( | |
echo TEXT NOT EXISTS [%%~zA] %%I | |
echo %%I >> %outfile% | |
) | |
rem pause | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment