pip install tika
from tika import parser pdf_path = "input.pdf" parsed = parser.from_file(pdf_path) txt = open('output.txt', 'w', encoding = 'utf-8') # output.txt에 pdf파일 내용을 write print(parsed['content'], file = txt) txt.close()