docling_export: Export a converted document

docling_exportR Documentation

Export a converted document

Description

Render a docling_convert() result into a downstream-friendly format.

Usage

as_markdown(x, ...)

## S3 method for class 'docling_document'
as_markdown(x, ...)

as_text(x, ...)

## S3 method for class 'docling_document'
as_text(x, ...)

as_html(x, ...)

## S3 method for class 'docling_document'
as_html(x, ...)

as_json(x, ...)

## S3 method for class 'docling_document'
as_json(x, ...)

as_doctags(x, ...)

## S3 method for class 'docling_document'
as_doctags(x, ...)

Arguments

x

A docling_document from docling_convert().

...

Additional arguments passed to the underlying Docling export method (for example image_mode for Markdown).

Value

  • as_markdown(): a length-1 character string of Markdown.

  • as_text(): a length-1 character string of plain text.

  • as_html(): a length-1 character string of HTML.

  • as_json(): an R list mirroring the DoclingDocument structure.

  • as_doctags(): a length-1 character string in Docling's DocTags format.

Examples

## Not run: 
doc <- docling_convert("report.pdf")
as_markdown(doc)
str(as_json(doc), max.level = 1)

## End(Not run)

doclingr documentation built on Oct. 28, 2026, 1:07 a.m.