Method: Mindee::Client#source_from_bytes

Defined in:
lib/mindee/client.rb

#source_from_bytes(input_bytes, filename, repair_pdf: false) ⇒ Mindee::Input::Source::BytesInputSource

Load a document from raw bytes.

Parameters:

  • input_bytes (String)

    Encoding::BINARY byte input

  • filename (String)

    The name of the file (without the path)

  • repair_pdf (bool) (defaults to: false)

    Attempts to fix broken pdf if true

Returns:



350
351
352
# File 'lib/mindee/client.rb', line 350

def source_from_bytes(input_bytes, filename, repair_pdf: false)
  Input::Source::BytesInputSource.new(input_bytes, filename, repair_pdf: repair_pdf)
end