docling/examples/minimal.py
Michele Dolfi 051beae203 use new interface in minimal example
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
2024-10-11 08:30:09 +02:00

9 lines
420 B
Python

from docling.document_converter import DocumentConverter
source = "https://arxiv.org/pdf/2408.09869" # PDF path or URL
converter = DocumentConverter()
result = converter.convert_single(source)
print(result.output.export_to_markdown()) # output: ## Docling Technical Report [...]"
# if the legacy output is needed, use this version
# print(result.render_as_markdown_v1()) # output: ## Docling Technical Report [...]"