Trying to extract text from this file, I get the error: invalid byte sequence in UTF-8 (ArgumentError)
It fails to extract the text from the 3rd page.
ruby -Ilib bin/pdf_text ~/Downloads/garage_remote.pdf
returns:
...text...
/home/mint/Programming/open_source/pdf-reader/lib/pdf/reader/page_layout.rb:75:in `strip': invalid byte sequence in UTF-8 (ArgumentError)
from /home/mint/Programming/open_source/pdf-reader/lib/pdf/reader/page_layout.rb:75:in `block in interesting_rows'
from /home/mint/Programming/open_source/pdf-reader/lib/pdf/reader/page_layout.rb:75:in `map'
from /home/mint/Programming/open_source/pdf-reader/lib/pdf/reader/page_layout.rb:75:in `interesting_rows'
from /home/mint/Programming/open_source/pdf-reader/lib/pdf/reader/page_layout.rb:52:in `to_s'
from /home/mint/Programming/open_source/pdf-reader/lib/pdf/reader/page.rb:140:in `text'
from bin/pdf_text:12:in `block in <main>'
from bin/pdf_text:11:in `each'
from bin/pdf_text:11:in `<main>'
Is this output expected? And if so, how would you recommend handling it?
Trying to extract text from this file, I get the error:
invalid byte sequence in UTF-8 (ArgumentError)It fails to extract the text from the 3rd page.
ruby -Ilib bin/pdf_text ~/Downloads/garage_remote.pdfreturns:
Is this output expected? And if so, how would you recommend handling it?