I got a email from George yesterday. he said,
I found your pdfcrypt program and wrote a CMD file that, if you place it in the same folder as pdfcrypt.exe, will let you drag an encrypted (but non-password protected) PDF onto the .cmd file to make a decrypted copy of the PDF in the same folder as the original. I put it under the GPL, so you can redistribute it with pdfcrypt, or post it on your site, or ignore it completely.
The script is attached with a .txt extension so that it is not flagged as a potential threat. You can look through it to ensure it does nothing but facilitate decrypting.
Thanks for your work pdfcrypt, it is much appreciated!
And here is the code he contributed, thanks for George’s kindness.
REM Written by George Tenney 11-29-09
REM Usage: Drop an encrypted, but non-password protected, PDF onto
REM this .cmd file to create a decrypted version in the same folder
REM as the original PDF.
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM To receive a copy of the GNU General Public License
REM Set pdfcrypt location
REM Check for quotes in filename (i.e., space in path)
IF ^%INFILE:~0,1% NEQ ^" GOTO :ADDQ
REM Don't add quotes around filenames
REM Display Messages
ECHO Input File:
ECHO Output File: (WILL BE OVERWRITTEN)
ECHO This may take a minute, please wait.
REM Run the decryption
%PROG% %INFILE% %OUTFILE% decrypt ""
ECHO Press any key to exit.
PAUSE > NUL