Originally reported via e-mail from Robert Boulanger:
I'm using your PyPDF Library specially for cataloging pdf files. When reading the DocumentInfos (Metadata, it often happens, that pdf's have the same keys multiple times.
In this case your lib raises an error, since multible keys are not permitted.
Wouldn't it be better to just skip the additional key/value pairs instead of raising an error ?
I changed generic.py in line 492 as follows:
if data.has_key(key):
# multiple definitions of key not permitted
pass #raise utils.PdfReadError, "multiple definitions in dictionary"
else: data[key] = value
Originally reported via e-mail from Robert Boulanger:
I'm using your PyPDF Library specially for cataloging pdf files. When reading the DocumentInfos (Metadata, it often happens, that pdf's have the same keys multiple times.
In this case your lib raises an error, since multible keys are not permitted.
Wouldn't it be better to just skip the additional key/value pairs instead of raising an error ?
I changed generic.py in line 492 as follows:
if data.has_key(key):
#raise utils.PdfReadError, "multiple definitions in dictionary"
data[key] = value
# multiple definitions of key not permitted
pass
else: