Closed shreyas closed 9 years ago
Thank you for these fixes. I'll definitely pull the empty password encrypted file fix. Would it be valuable to let users provide a password on the command line if all the encrypted files had the same password?
The problem with the imports is that you can't use pdfmerge
as a module if they are only pulled in during main
. I think I'll use the conditional import (try: import ... except ImportError: ...
) so that the tests don't fail.
Yes, I had thought about adding a -p for password, but then thought there would be two problems:
So avoided adding it altogether.
As for importing pdfmerge as module, wonder how I missed that possibility. Try-except sounds better.
On Dec 31, 2014, at 8:55 PM, metaist notifications@github.com wrote:
Thank you for these fixes. I'll definitely pull the empty password encrypted file fix. Would it be valuable to let users provide a password on the command line if all the encrypted files had the same password?
The problem with the imports is that you can't use pdfmerge as a module if they are only pulled in during main. I think I'll use the conditional import (try: import ... except ImportError: ...) so that the tests don't fail.
— Reply to this email directly or view it on GitHub.
pip install fails if PyPDF2 is not already installed, since setup.py imports pdfmerge for doc and author, but pdfmerge in turn imports PyPDF2. the import now happens if the module runs as main
also, the command fails if a pdf file is reported as encrypted, even though no password is set. using default password, which is blank, fixes these situations.