How does OCR in Writer work?

I have Libre Office 6.0.6.2, which I use on a MacBook Pro with OSX 10.12.6. The Writer has a menu option at the top of the screen labled “OCR”. When I click on it, I get “Upload Image”. When I click on “Upload Image”, I get nothing (blank). Am I supposed to be able to process an image with Optical Character Recognition and convert it into a text or PDF file? Why isn’t it working?

Thanks,
Steve

Hello,

LO has no OCR capabilities. See also answer in this post:

It is probable you have an extension installed. Check your extensions. Possibly this one:

https://extensions.libreoffice.org/extensions/libre-ocr

which appears to be a non-stable version nor updated in some time.

Yes, you’re right. Very embarrassing that I didn’t see that. I don’t remember installing it. Sorry and thank you.

Please edit your question or add a comment to other answer.

In Mac, it’s possible install Tesseract, Pillow and Python Tesseract, and used next macro:

import uno
from PIL import Image
import pytesseract

def main():    
    path_image = '/home/mau/test.png'
    data = pytesseract.image_to_string(Image.open(path_image))

    doc = XSCRIPTCONTEXT.getDocument()
    doc.Text.String = data
    return

With this macro I get: