Open Prasaddiwalkar opened 4 years ago
Likely related - dumppdf.py
also fails similarly:
Traceback (most recent call last):
File "/home/wynand/.virtualenvs/pdf/bin/dumppdf.py", line 272, in <module>
if __name__ == '__main__': sys.exit(main(sys.argv))
File "/home/wynand/.virtualenvs/pdf/bin/dumppdf.py", line 269, in main
dumpall=dumpall, mode=mode, extractdir=extractdir)
File "/home/wynand/.virtualenvs/pdf/bin/dumppdf.py", line 222, in dumppdf
dumptrailers(outfp, doc)
File "/home/wynand/.virtualenvs/pdf/bin/dumppdf.py", line 95, in dumptrailers
out.write('<trailer>\n')
TypeError: a bytes-like object is required, not 'str'
yes I also observed the same for dump as well
Traceback (most recent call last):
File "dumppdf.py", line 272, in <module>
if __name__ == '__main__': sys.exit(main(sys.argv))
File "dumppdf.py", line 269, in main
dumpall=dumpall, mode=mode, extractdir=extractdir)
File "dumppdf.py", line 222, in dumppdf
dumptrailers(outfp, doc)
File "dumppdf.py", line 95, in dumptrailers
out.write('<trailer>\n')
TypeError: a bytes-like object is required, not 'str'
Fails with the sample PDFs provided by the repo so it's not an issue with our files then.
pdfminer.six
works, going to use that for now.
yes pdfminer.six is working for me as well but it gives me
I am expecting it should give me text node for each word or each line
in pdfminer.six it does not maintain the sequence of text from pdf flie for text and xml
Any update here?
python pdf2txt.py -t xml -o output.xml -d %pdffilepath% fails with following error