Catalog
affaan-m/nutrient-document-processing

affaan-m

nutrient-document-processing

Process, convert, OCR, extract, redact, sign, and fill documents using the Nutrient DWS API. Works with PDFs, DOCX, XLSX, PPTX, HTML, and images.

global
origin:ECC
New~1.5k
v1.2Saved Jul 14, 2026

Nutrient Document Processing

Note: This skill integrates with the Nutrient commercial API. Review their terms before use.

Process documents with the Nutrient DWS Processor API. Convert formats, extract text and tables, OCR scanned documents, redact PII, add watermarks, digitally sign, and fill PDF forms.

Setup

Get a free API key at nutrient.io

export NUTRIENT_API_KEY="pdf_live_..."

All requests go to https://api.nutrient.io/build as multipart POST with an instructions JSON field.

Operations

Convert Documents

# DOCX to PDF
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.docx=@document.docx" \
  -F 'instructions={"parts":[{"file":"document.docx"}]}' \
  -o output.pdf

# PDF to DOCX
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"docx"}}' \
  -o output.docx

# HTML to PDF
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "index.html=@index.html" \
  -F 'instructions={"parts":[{"html":"index.html"}]}' \
  -o output.pdf

Supported inputs: PDF, DOCX, XLSX, PPTX, DOC, XLS, PPT, PPS, PPSX, ODT, RTF, HTML, JPG, PNG, TIFF, HEIC, GIF, WebP, SVG, TGA, EPS.

Extract Text and Data

# Extract plain text
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"text"}}' \
  -o output.txt

# Extract tables as Excel
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"output":{"type":"xlsx"}}' \
  -o tables.xlsx

OCR Scanned Documents

# OCR to searchable PDF (supports 100+ languages)
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "scanned.pdf=@scanned.pdf" \
  -F 'instructions={"parts":[{"file":"scanned.pdf"}],"actions":[{"type":"ocr","language":"english"}]}' \
  -o searchable.pdf

Languages: Supports 100+ languages via ISO 639-2 codes (e.g., eng, deu, fra, spa, jpn, kor, chi_sim, chi_tra, ara, hin, rus). Full language names like english or german also work. See the complete OCR language table for all supported codes.

Redact Sensitive Information

# Pattern-based (SSN, email)
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"social-security-number"}},{"type":"redaction","strategy":"preset","strategyOptions":{"preset":"email-address"}}]}' \
  -o redacted.pdf

# Regex-based
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"redaction","strategy":"regex","strategyOptions":{"regex":"\\b[A-Z]{2}\\d{6}\\b"}}]}' \
  -o redacted.pdf

Presets: social-security-number, email-address, credit-card-number, international-phone-number, north-american-phone-number, date, time, url, ipv4, ipv6, mac-address, us-zip-code, vin.

Add Watermarks

curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"watermark","text":"CONFIDENTIAL","fontSize":72,"opacity":0.3,"rotation":-45}]}' \
  -o watermarked.pdf

Digital Signatures

# Self-signed CMS signature
curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "document.pdf=@document.pdf" \
  -F 'instructions={"parts":[{"file":"document.pdf"}],"actions":[{"type":"sign","signatureType":"cms"}]}' \
  -o signed.pdf

Fill PDF Forms

curl -X POST https://api.nutrient.io/build \
  -H "Authorization: Bearer $NUTRIENT_API_KEY" \
  -F "form.pdf=@form.pdf" \
  -F 'instructions={"parts":[{"file":"form.pdf"}],"actions":[{"type":"fillForm","formFields":{"name":"Jane Smith","email":"jane@example.com","date":"2026-02-06"}}]}' \
  -o filled.pdf

MCP Server (Alternative)

For native tool integration, use the MCP server instead of curl:

{
  "mcpServers": {
    "nutrient-dws": {
      "command": "npx",
      "args": ["-y", "@nutrient-sdk/dws-mcp-server"],
      "env": {
        "NUTRIENT_DWS_API_KEY": "YOUR_API_KEY",
        "SANDBOX_PATH": "/path/to/working/directory"
      }
    }
  }
}

When to Use

  • Converting documents between formats (PDF, DOCX, XLSX, PPTX, HTML, images)
  • Extracting text, tables, or key-value pairs from PDFs
  • OCR on scanned documents or images
  • Redacting PII before sharing documents
  • Adding watermarks to drafts or confidential documents
  • Digitally signing contracts or agreements
  • Filling PDF forms programmatically
Files1
1 files · 1.0 KB

Select a file to preview

Overall Score

78/100

Grade

B

Good

Safety

80

Quality

75

Clarity

82

Completeness

72

Summary

This skill enables document processing via the Nutrient DWS Processor API, supporting conversions between formats (PDF, DOCX, XLSX, PPTX, HTML, images), text/table extraction, OCR, redaction, watermarking, digital signing, and form filling. The skill provides curl examples for each operation and includes setup instructions for both direct API access and an MCP server integration.

Detected Capabilities

http requestmultipart form submissionfile readfile writeenvironment variable readAPI key usage

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

convert documentsextract pdf textocr documentsredact piisign documentsfill formswatermark pdf

Risk Signals

INFO

API key stored in environment variable (NUTRIENT_API_KEY)

Setup section and curl examples
INFO

Bearer token passed in HTTP Authorization header

All curl examples
INFO

Outbound HTTPS requests to api.nutrient.io

All operation examples (curl POST to https://api.nutrient.io/build)
INFO

File uploads via multipart POST

All operation examples

Referenced Domains

External domains referenced in skill content, detected by static analysis.

api.nutrient.iodashboard.nutrient.iowww.npmjs.comwww.nutrient.io

Use Cases

  • Convert between document formats (DOCX to PDF, PDF to DOCX, HTML to PDF, etc.)
  • Extract text and tabular data from PDFs for downstream processing
  • OCR scanned documents and images to create searchable PDFs
  • Redact PII (SSN, email, credit card, phone numbers) before sharing sensitive documents
  • Add watermarks to draft or confidential documents
  • Digitally sign contracts and agreements programmatically
  • Populate PDF form fields with structured data

Quality Notes

  • Strengths: Clear, well-structured instructions with practical curl examples for each operation (convert, extract, OCR, redact, watermark, sign, fill). Well-organized sections with concrete use cases.
  • Strengths: Explicit setup instructions including how to obtain API key and set environment variables.
  • Strengths: Comprehensive redaction presets documented (SSN, email, credit card, phone, date, URL, IP, MAC, zip code, VIN) with both pattern-based and regex-based strategies.
  • Strengths: Language support for OCR clearly explained with examples (ISO 639-2 codes and full names).
  • Strengths: Alternative MCP server option provided for tool integration with clear configuration.
  • Weakness: No error handling guidance — what happens if API key is invalid, file is unsupported, or request fails?
  • Weakness: No guardrails for PII handling — skill describes redaction but does not document best practices for working with sensitive data.
  • Weakness: No limitations documented on file size, API rate limits, or processing time expectations.
  • Weakness: No guidance on retries, timeout handling, or partial failures (e.g., OCR partially succeeding).
  • Weakness: Form filling example uses hardcoded values — no guidance on loading field mappings from structured data sources.
Model: claude-haiku-4-5-20251001Analyzed: Jul 14, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

v1.2

Content updated

2026-07-14

Latest
v1.1

Content updated

2026-04-20

v1.0

Seeded from github.com/affaan-m/everything-claude-code

2026-03-16

Use affaan-m/nutrient-document-processing in your dev environment

Command Palette

Search for a command to run...