Skip to content
Back to skills

Conversion

ASecurity

"Use Docling's Python conversion API for local paths, URLs,

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
toolspythonrustshellapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill conversion --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Conversion?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Conversion
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-conversion/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-conversion)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: conversion
description: "Use Docling's Python conversion API for local paths, URLs,
  streams, and in-memory Markdown/HTML/DocLang strings, including safe smoke
  conversions and failure handling."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Conversion

Use this sub-skill when a task needs Python API conversion into a `DoclingDocument` with `DocumentConverter`, `convert`, `convert_all`, `convert_string`, or `DocumentStream`.

Route elsewhere when the task is mainly about:
- CLI commands, supported format tables, or shell recipes: `cli-and-formats`.
- Export formats, Markdown/JSON/HTML serialization strategy, or chunking: `document-outputs`.
- OCR, table structure, PDF model options, accelerator settings, or artifacts paths: `pipeline-configuration`.
- VLM, ASR, remote model services, or advanced backends: `advanced-pipelines`.
- Structured data extraction with `DocumentExtractor`: `extraction`.

## Fast Path

```python
from docling.document_converter import DocumentConverter

converter = DocumentConverter()
result = converter.convert("document.pdf")  # local path or URL
markdown = result.document.export_to_markdown()
```

For string content, do not pass the raw string to `convert`; use `convert_string` with a supported `InputFormat`:

```python
from docling.datamodel.base_models import InputFormat
from docling.document_converter import DocumentConverter

converter = DocumentConverter(allowed_formats=[InputFormat.MD])
result = converter.convert_string("# Title\n\nBody", format=InputFormat.MD, name="note.md")
```

## References

- `references/api-reference.md` for constructor signatures, source types, limits, headers, batch conversion, and status handling.
- `references/workflows.md` for copy-ready local path, URL, stream, string, batch, and smoke-test recipes.
- `references/troubleshooting.md` for optional dependency, model download, wrong format option, headers, file limit, invalid path, and `raises_on_error` failures.
- `scripts/convert_fixture.py` for a safe installed-package helper that converts a caller-supplied path or string to Markdown or JSON.

## Safety Defaults

- Prefer `allowed_formats=[...]` for smoke tests and user-controlled uploads so accidental format detection cannot trigger heavier pipelines.
- Use `max_num_pages`, `max_file_size`, and `page_range` for PDFs or untrusted documents.
- Use `raises_on_error=False` when collecting partial batch results; inspect `result.status` and `result.errors` before exporting.
- Expect first PDF/image conversions to download model artifacts unless the environment has prefetched models.

Files in this skill

  • SKILL.md2.6 KB
  • references/api-reference.md5.8 KB
  • references/troubleshooting.md5.6 KB
  • references/workflows.md5.3 KB
  • scripts/convert_fixture.py7.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.