# Document parsing

URL: https://www.getdynamiq.ai/glossary/document-parsing

> Converting a file such as a PDF, scan or slide deck into clean, structured text, typically Markdown, that a model or index can use.

Converting a file such as a PDF, scan or slide deck into clean, structured text, typically Markdown, that a model or index can use.

Document parsing turns a file format into text a model can actually reason over, while preserving the structure that gives the content its meaning: headings, tables, lists, emphasis. That is different from plain OCR, which recovers characters but not the relationships between them, so a table becomes a row of numbers with no columns.

A contract or a policy document is not just words, it is words in a specific structure, clause numbers, defined terms, tables of figures. Flattening that structure into a wall of text loses information a regulated reader, human or model, actually depends on.

A scanned invoice is parsed into Markdown with its line-item table intact, so an amount can still be matched to the specific item it belongs to, instead of a stream of numbers with no columns to anchor them.

**In Dynamiq**, Document Parse in the AI Gateway runs a vision-capable model over a PDF or image and returns Markdown that keeps headings, tables and lists, while skipping running headers, footers and blank pages, callable from a playground or a single API endpoint.

## See it in Dynamiq

-   [Knowledge](https://www.getdynamiq.ai/product/knowledge-rag)

## Related terms

-   [Intelligent document processing](https://www.getdynamiq.ai/glossary/intelligent-document-processing)
-   [Chunking](https://www.getdynamiq.ai/glossary/chunking)
-   [Retrieval-augmented generation (RAG)](https://www.getdynamiq.ai/glossary/retrieval-augmented-generation)

## See an agent on your own workflow.

Bring a process and its documents. Our engineers will show you how Dynamiq runs it, in your environment or ours.

[Start free](https://app.getdynamiq.ai/signup) · [Talk to the team](https://www.getdynamiq.ai/book-a-demo)
