A CLI tool to convert documents between multiple formats using Docling.
Install all dependencies (Node.js and Python) with one command:
npm run setupOr install separately:
npm install
pip install docling
# Install opencv without dependencies to avoid numpy version conflicts
pip install --no-deps opencv-python-headless || pip install opencv-python-headlessNote: Docling requires OpenCV to work properly. We use opencv-python-headless (lighter version without GUI dependencies). If you encounter numpy version conflicts, try installing with --no-deps flag first.
npm link
pdfconvert document.pdf > output.mdpdfconvert <input-file> [options] > output.md-f, --format <format>- Output format (html, markdown, json, text, doctags) [default: markdown]-q, --quiet- Suppress progress messages (output only)-h, --help- Show help message
PDF, Markdown, ASCIIDoc, HTML, XHTML, CSV, PNG, JPEG, TIFF, BMP, WEBP, WebVTT
html- HTML formatmarkdownormd- Markdown formatjson- JSON formattext- Plain text formatdoctags- DocTags format
# Convert PDF to Markdown
pdfconvert document.pdf > output.md
# Convert PDF to HTML
pdfconvert document.pdf --format html > output.html
# Convert image to Markdown
pdfconvert image.png --format markdown > output.md
# Convert PDF to JSON
pdfconvert document.pdf --format json > output.json
# Quiet mode (no progress messages)
pdfconvert document.pdf --quiet > output.mdRun directly with tsx:
npx tsx packages/index.ts document.pdf > output.md