**Bug report** With some PDF file, the code crash with `TypeError: 'PDFObjRef' object is not iterable`. I propose a PR [here](https://github.com/pdfminer/pdfminer.six/pull/1081)