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