How to detect if the file is a valid pdf/a?