How to classify different pdf documents

okay. use an if statement to differentiate the documents?