import cv2 import pytesseract img = cv2.imread('/Users/user1/Desktop/folder1/pdf1.pdf') text = pytesseract.image_to_string(img) print(text)