Convert images to text, PDF, or TSV
masterUse RTesseract.new to initialize an instance with an image path, then call the appropriate conversion method.
to_s: Returns the extracted text as a string.to_pdf: Returns an open file object of a searchable PDF (preserves image colors, pictures, and structure).to_tsv: Returns an open file object of the TSV data.
image = RTesseract.new("my_image.jpg")
# Get text string
text = image.to_s
# Get searchable PDF
pdf = image.to_pdf
# Get TSV file
tsv = image.to_tsv