The PDF::Reader library implements a PDF parser conforming as much as possible to the PDF specification from Adobe WWW: http://github.com/yob/pdf-reader