This example demonstrates a minimal installation of Nutrient Document Engine on a local Kubernetes cluster using OrbStack.
OrbStack is a fast, lightweight alternative to Docker Desktop for macOS. It provides native support for running Docker containers and Kubernetes clusters with minimal resource usage and excellent performance.
This example uses OrbStack’s built-in Kubernetes support to deploy Document Engine locally, making it ideal for:
- Local development and testing
- Learning Document Engine deployment on Kubernetes
- Prototyping before deploying to production clusters
- OrbStack installed with Kubernetes enabled
- kubectl - Kubernetes command-line tool
- Helm - Kubernetes package manager
You can install kubectl and Helm on macOS using Homebrew:
brew install kubectl helm-
Install OrbStack and enable Kubernetes (one-time setup)
Install OrbStack for macOS, then open the OrbStack app and enable Kubernetes from the settings panel. To verify Kubernetes is running:
kubectl version
-
Run the automated setup script
./setup.sh
The script will automatically install all dependencies and deploy Document Engine. This typically takes 3-5 minutes.
Once Document Engine is running, you can use the Document Engine API to perform different operations. Below are a few examples:
Upload the sample PDF document:
curl --request POST \
--url http://document-engine.k8s.orb.local/api/documents \
--header 'Authorization: Token token=secret' \
--form 'pdf-file-from-multipart=@sample.pdf' \
--form 'instructions={"parts":[{"file":"pdf-file-from-multipart"}],"actions":[],"output":{"type":"pdf","metadata":{"title":"Test Document","author":"API User"}}}'The response will include a document_id that you can use in the following examples.
curl --request GET \
--url http://document-engine.k8s.orb.local/api/documents \
--header 'Authorization: Token token=secret'Replace DOCUMENT_ID with the actual document ID from the upload response:
curl --request GET \
--url http://document-engine.k8s.orb.local/api/documents/DOCUMENT_ID/document_info \
--header 'Authorization: Token token=secret'Extract text from all pages:
curl --request GET \
--url http://document-engine.k8s.orb.local/api/documents/DOCUMENT_ID/pages/text \
--header 'Authorization: Token token=secret'Download the processed PDF:
curl --request GET \
--url http://document-engine.k8s.orb.local/api/documents/DOCUMENT_ID/pdf \
--header 'Authorization: Token token=secret' \
--output downloaded-document.pdfNutrient offers support for customers with an active SDK license via Nutrient Support.
Are you evaluating our SDK? That's great, we're happy to help out! To make sure this is fast, please use a work email and have someone from your company fill out our sales form.
This project is licensed under the BSD license. See the LICENSE file for more details.
Please ensure you have signed our CLA so that we can accept your contributions.