CommonCompute
Get startedDownload the Mac app
Workloads

OCR

Convert PDFs, scans, and images into structured JSON. Text comes back in reading order with per-block bounding boxes. PDF pages that already contain text are read exactly rather than recognised, so no OCR error is introduced.

python
job = cc.ocr.extract(
    "contract.pdf",
    structured=True,
)
for page in job.wait().output["pages"]:
    for block in page["blocks"]:
        print(block["text"], block["bbox"])

Recognition is English by default — pass languages=["de-DE"] for anything else. You can also narrow to a region_of_interest, bias toward domain vocabulary with custom_words, and raise dpi for dense scans.

python
job = cc.ocr.extract(
    "rechnung.pdf",
    languages=["de-DE"],
    custom_words=["Umsatzsteuer", "Rechnungsnummer"],
)

Apple Vision is strong on printed text and weak on handwriting. For handwritten or unusual documents, engine="vlm" runs a vision-language model instead — it needs a 16 GB Mac, takes longer per page, and returns text without bounding boxes.

python
job = cc.ocr.extract(
    "handwritten-notes.jpg",
    engine="vlm",
)
print(job.wait().output["answer"])