skills/community/nano-pdf/SKILL.md
PDF processing: extraction, text mining, form filling, manipulation, OCR integration
npx skillsauth add alphaonedev/openclaw-graph nano-pdfInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides tools for PDF processing, including text extraction, mining, form filling, manipulation, and OCR integration, to handle document workflows efficiently.
Use this skill for tasks involving PDF data extraction (e.g., from scanned documents), text analysis in reports, automating form submissions, merging/splitting files, or applying OCR to non-text PDFs. Apply it in data pipelines, document automation scripts, or when integrating with OCR services for unstructured data.
Invoke via CLI for quick scripts or API for server-side integration. For batch processing, chain commands in a shell script; for web apps, use API calls in loops. Always specify input/output paths explicitly. Pattern: Extract text first, then mine or manipulate as needed. For OCR-heavy tasks, preprocess images before PDF operations.
CLI commands use nano-pdf binary; API endpoints are under https://api.opencclaw.com/nano-pdf/. Authentication requires $NANO_PDF_API_KEY environment variable.
nano-pdf extract --file input.pdf --output text.txt --ocr true (adds OCR if text is not selectable).nano-pdf mine --input text.txt --keywords "AI,robot" --output results.json (outputs keyword frequencies).nano-pdf fill --template form.pdf --data '{"field1": "value"}' --output filled.pdf.nano-pdf merge --files file1.pdf file2.pdf --output combined.pdf.{"file": "base64encoded_content", "ocr": true} and header Authorization: Bearer $NANO_PDF_API_KEY.import requests
response = requests.post('https://api.opencclaw.com/nano-pdf/extract', headers={'Authorization': f'Bearer {os.environ["NANO_PDF_API_KEY"]}'}, json={'file': 'base64data'})
print(response.json()['text'])
{"file": "path", "options": {"ocr_engine": "tesseract", "language": "en"}}; CLI uses flag-based configs like --config config.json.Integrate by setting $NANO_PDF_API_KEY for authenticated requests; for local use, install via pip install nano-pdf and import as a module. Combine with other tools: pipe CLI output to NLP libraries for mining, or use in Node.js via HTTP requests. For OCR, ensure Tesseract is installed and configured in your environment path. Test integrations in a sandbox to verify API rate limits (e.g., 100 requests/min).
Check for common errors like file not found (exit code 404), invalid API keys (401), or OCR failures (e.g., no Tesseract installed). Use try-except in code:
try:
result = nano_pdf.extract('input.pdf')
except FileNotFoundError:
print("Error: File does not exist.")
except Exception as e:
print(f"API Error: {e} - Check $NANO_PDF_API_KEY.")
For CLI, parse stderr output; retry transient errors (e.g., network issues) with exponential backoff. Always validate inputs, like ensuring PDFs are not corrupted before processing.
To extract text from a scanned invoice PDF and mine for product names:
nano-pdf extract --file invoice.pdf --output invoice_text.txt --ocr truenano-pdf mine --input invoice_text.txt --keywords "product" --output analysis.json
This produces a JSON with keyword occurrences for further processing.To fill a job application form and merge it with a cover letter:
{"name": "John Doe", "position": "Engineer"}nano-pdf fill --template application.pdf --data application_data.json --output filled_app.pdfnano-pdf merge --files filled_app.pdf cover_letter.pdf --output final_packet.pdf
Output is a single PDF ready for submission.tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui