euske/pdfminer — pull request #13 by begnini (2012-03-19 19:45:26+00:00)
Title: PDFDocument.lookup_name.lookup isn't searching for 'Names' key.

Hi,

I don't know pdf format very well, so, I'll try to explain what happened and how i fixed this bug.

Couple of months ago, I sended a patch to search for keys when destinations are strings. Now, I found a bug with this case. One pdf file created with Acrobat InDesign CS 5 was making PDFDocument.get_dest throw a PDFDestinationNotFound for all names.

This happened because PDFDocument.lookup_name.lookup wasn't testing for 'Names'. Reading the code, looks like a indent error, where the if searching for 'Names' didn't should be inside the if searching for 'Limits'.