Sha256: 769758ce392606388824fe9e37a444b30da2d6968a8c4156735fd68f68796ad1

Contents?: true

Size: 197 Bytes

Versions: 2

Compression:

Stored size: 197 Bytes

Contents

def pdf_to_text(pdf_stream)
  file = Tempfile.new('pdf', :encoding => 'ascii-8bit')
  file.write pdf_stream
  file.close
  pdf = PDF::Toolkit.open(file)
  pdf.to_text.read
ensure
  file.unlink
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
medivo-0.1.0 spec/support/helper.rb
medivo-0.0.13 spec/support/helper.rb