How to check if PDF is scanned image or contains text How to check if PDF is scanned image or contains text python python