Method: BxBuilderChain::Processors::Pdf#parse
- Defined in:
- lib/bx_builder_chain/processors/pdf.rb
#parse(data) ⇒ String
Parse the document and return the text
17 18 19 20 21 22 23 |
# File 'lib/bx_builder_chain/processors/pdf.rb', line 17 def parse(data) ::PDF::Reader .new(StringIO.new(data.read)) .pages .map(&:text) .join("\n\n") end |