You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pdf file is attached as sample.pdf python pdf2txt.py "sample.pdf" --pagenos "1"
stacktrace.
Traceback (most recent call last):
File "pdf2txt.py", line 188, in <module>
sys.exit(main())
File "pdf2txt.py", line 182, in main
outfp = extract_text(**vars(A))
File "pdf2txt.py", line 56, in extract_text
pdfminer.high_level.extract_text_to_fp(fp, **locals())
File "***/lib/python3.6/site-packages/pdfminer/high_level.py", line 86, in extract_text_to_fp
interpreter.process_page(page)
File "***/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 895, in process_page
self.render_contents(page.resources, page.contents, ctm=ctm)
File "***/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 908, in render_contents
self.execute(list_value(streams))
File "***/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 933, in execute
func(*args)
File "***/lib/python3.6/site-packages/pdfminer/pdfinterp.py", line 840, in do_EI
if 'W' in obj and 'H' in obj:
TypeError: a bytes-like object is required, not 'str'
The text was updated successfully, but these errors were encountered:
Bug report
python type errors are raised when the object is not of type
PDFStream
.The obj type can be
byte
. There is no type check when using the functional callin
.https://github.com/pdfminer/pdfminer.six/blob/develop/pdfminer/pdfinterp.py#L840
The pdf file is attached as
sample.pdf
python pdf2txt.py "sample.pdf" --pagenos "1"
stacktrace.
The text was updated successfully, but these errors were encountered: