Text needs to be encoded by Unicode to write to .txt file ==> pdf_txt.encode("utf-8"). Otherwise I get following error.
Traceback (most recent call last):
File "/Users/xamarind/Documents/pdf_reader.py", line 20, in
output_txt_file.write(pdf_txt)
TypeError: write() argument must be str, not bytes
Text needs to be encoded by Unicode to write to .txt file ==> pdf_txt.encode("utf-8"). Otherwise I get following error.
Traceback (most recent call last): File "/Users/xamarind/Documents/pdf_reader.py", line 20, in
output_txt_file.write(pdf_txt)
TypeError: write() argument must be str, not bytes