Activity log for bug #242755

Date Who What changed Old value New value Message
2008-06-24 19:05:00 Mathieu Fenniak bug added bug
2008-10-27 18:21:20 Tim Arnold description 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): # multiple definitions of key not permitted pass #raise utils.PdfReadError, "multiple definitions in dictionary" else: data[key] = value ============================== Just adding that I too had to make the same change. I create pdf files with pdflatex using hyperref. Some of my pdfs could not be opened by pyPdf, although some could be opened with no problem (all generated using the same workflow). In any case, this modification made it possible to open all of my pdfs. I think it should be considered for adding to the real distribution. thanks, --Tim Arnold
2010-03-05 18:55:01 max removed subscriber max
2012-07-13 22:10:23 Frederik Elwert pypdf: status New Confirmed
2013-03-06 16:44:32 outofhanwell bug added subscriber outofhanwell
2013-09-25 12:56:08 Daniel Widerin bug added subscriber Daniel Widerin
2014-10-17 12:22:00 Uli Tillich bug added subscriber Uli Tillich
2016-06-09 17:05:35 MarcH bug added subscriber MarcH
2016-06-09 17:10:27 MarcH attachment added Tim Arnold's fix attached as a patch for convenience https://bugs.launchpad.net/pypdf/+bug/242755/+attachment/4680540/+files/pypdf_multiple_defs_arnold_fix.patch
2017-08-08 18:29:57 Lonnie Lee Best tags xenial
2017-08-08 18:33:03 Lonnie Lee Best bug task added pdfshuffler