PDF has to go first, then the "application/" mimetype check.