diff --git a/README.md b/README.md index d1ba0ff1..96fa50ee 100644 --- a/README.md +++ b/README.md @@ -146,8 +146,8 @@ 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.render_as_markdown_v1()) # output: "## Docling Technical Report[...]" -print(result.render_as_doctags_v1()) # output: "<page_1><loc_20>..." +print(result.output.export_to_markdown()) # output: "## Docling Technical Report[...]" +print(result.output.export_to_document_tokens()) # output: "<document><title><page_1><loc_20>..." ``` ### Convert a batch of documents diff --git a/examples/minimal.py b/examples/minimal.py index 88fe7c33..fb84cca4 100644 --- a/examples/minimal.py +++ b/examples/minimal.py @@ -2,5 +2,7 @@ from docling.document_converter import DocumentConverter source = "https://arxiv.org/pdf/2408.09869" # PDF path or URL converter = DocumentConverter() -doc = converter.convert_single(source) -print(doc.render_as_markdown_v1()) # output: ## Docling Technical Report [...]" +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 [...]"