img2pdf

How to convert .png images to searchable PDF/word using Python

时间秒杀一切 提交于 2019-12-25 18:15:15
问题 Recently, I took a project. Converting a scanned PDF to searchable PDF/word using Python tesseract. After few attempts, I could able to convert scanned PDF to PNG image files and afterwards, I'm struck could anyone please help me to convert the PNG files to Word/PDF searchable.my piece of code attached Please find the attached image for reference. Import os Import sys from PIL import image Import pytesseract from pytesseract import image_to_string Libpath =r'_______' #site-package Pop_path=r'