This folder shows you how you can run the Cape's confidential optical character recognition service from the SDKs: cape-js and pycape.
Before invoking the OCR service from one of the SDKs, you must sign up with Cape and generate a personal access token.
For this example, we will run the OCR on the PDF claude_shannon.pdf
.
Before invoking the OCR, set the environment variable CAPE_AUTH_TOKEN
to your personal access token.
export CAPE_AUTH_TOKEN="your cape auth token"
To run the OCR from cape-js on the PDF, run:
node run_ocr.mjs
To encrypt the PDF with cape.encrypt, then invoke the OCR on the encrypted PDF, run:
node encrypt_run_ocr.mjs
Before invoking the OCR, set the environment variable CAPE_AUTH_TOKEN
to your personal access token.
export CAPE_AUTH_TOKEN="your cape auth token"
To run the OCR from pycape on the PDF, run:
python run_ocr.py
To encrypt the PDF with cape.encrypt, then invoke the OCR on the encrypted PDF, run:
python encrypt_run_ocr.py