This patch also wraps the code that checks the form type and moves it from pdfinfo to the Catalog class.