compass.services.cpu.read_pdf_doc_ocr#

async read_pdf_doc_ocr(pdf_bytes, **kwargs)[source]#

Read PDF file using OCR (pytesseract)

Note that Pytesseract must be set up properly for this method to work. In particular, the pytesseract.pytesseract.tesseract_cmd attribute must be set to point to the pytesseract exe.

Parameters:
Returns:

elm.web.document.PDFDocument – PDFDocument instances with pages loaded as text.