Class ConvertDocumentOptions
java.lang.Object
ai.docling.serve.api.convert.request.options.ConvertDocumentOptions
Options for configuring the document conversion process with Docling.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull ConvertDocumentOptions.Builderbuilder()@Nullable BooleanAbort on error if enabled.@Nullable BooleanIf enabled, perform OCR code enrichment.@Nullable DurationThe timeout for processing each document, in seconds.@Nullable BooleanIf enabled, perform formula OCR, return LaTeX code.@Nullable BooleangetDoOcr()If enabled, the bitmap content will be processed using OCR.@Nullable BooleanIf enabled, classify pictures in documents.@Nullable BooleanIf enabled, describe pictures in documents.@Nullable BooleanIf enabled, the table structure will be extracted.@Nullable BooleanIf enabled, replace existing text with OCR-generated text over content.Input format(s) to convert from.@Nullable ImageRefModeImage export mode for the document (in case of JSON, Markdown or HTML).@Nullable DoubleScale factor for images.@Nullable BooleanIf enabled, images will be extracted from the document.@Nullable StringAdd this placeholder between pages in the markdown output.@Nullable OcrEngineThe OCR engine to use.List of languages used by the OCR engine.Only convert a range of pages.@Nullable PdfBackendThe PDF backend to use.@Nullable PictureDescriptionApiAPI details for using a vision-language model in the picture description.@Nullable DoubleMinimum percentage of the area for a picture to be processed with the models.@Nullable PictureDescriptionLocalOptions for running a local vision-language model in the picture description.@Nullable ProcessingPipelineChoose the pipeline to process PDF or image files.@Nullable BooleanIf true, matches table cells predictions back to PDF cells.@Nullable TableFormerModeMode to use for table structure, String.Output format(s) to convert to.@Nullable VlmModelTypePreset of local and API models for the vlm pipeline.@Nullable StringAPI details for using a vision-language model for the vlm pipeline.@Nullable StringOptions for running a local vision-language model for the vlm pipeline.@NonNull ConvertDocumentOptions.Builder@NonNull StringtoString()
-
Method Details
-
builder
-
toBuilder
-
getFromFormats
Input format(s) to convert from. String or list of strings. Allowed values: docx, pptx, html, image, pdf, asciidoc, md, csv, xlsx, xml_uspto, xml_jats, mets_gbs, json_docling, audio, vtt. Optional, defaults to all formats. -
getToFormats
Output format(s) to convert to. String or list of strings. Allowed values: md, json, html, html_split_page, text, doctags. Optional, defaults to Markdown. -
getImageExportMode
Image export mode for the document (in case of JSON, Markdown or HTML). Allowed values: placeholder, embedded, referenced. Optional, defaults to Embedded. -
getDoOcr
If enabled, the bitmap content will be processed using OCR. Boolean. Optional, defaults to true. -
getForceOcr
If enabled, replace existing text with OCR-generated text over content. Boolean. Optional, defaults to false. -
getOcrEngine
The OCR engine to use. String. Allowed values: auto, easyocr, ocrmac, rapidocr, tesserocr, tesseract. Optional, defaults to easyocr. -
getOcrLang
List of languages used by the OCR engine. Note that each OCR engine has different values for the language names. String or list of strings. Optional, defaults to empty. -
getPdfBackend
The PDF backend to use. String. Allowed values: pypdfium2, dlparse_v1, dlparse_v2, dlparse_v4. Optional, defaults to dlparse_v4. -
getTableMode
Mode to use for table structure, String. Allowed values: fast, accurate. Optional, defaults to accurate. -
getTableCellMatching
If true, matches table cells predictions back to PDF cells. Can break table output if PDF cells are merged across table columns. If false, let table structure model define the text cells, ignore PDF cells. -
getPipeline
Choose the pipeline to process PDF or image files. -
getPageRange
Only convert a range of pages. The page number starts at 1. -
getDocumentTimeout
The timeout for processing each document, in seconds. -
getAbortOnError
Abort on error if enabled. Boolean. Optional, defaults to false. -
getDoTableStructure
If enabled, the table structure will be extracted. Boolean. Optional, defaults to true. -
getIncludeImages
If enabled, images will be extracted from the document. Boolean. Optional, defaults to true. -
getImagesScale
Scale factor for images. Float. Optional, defaults to 2.0. -
getMdPageBreakPlaceholder
Add this placeholder between pages in the markdown output. -
getDoCodeEnrichment
If enabled, perform OCR code enrichment. Boolean. Optional, defaults to false. -
getDoFormulaEnrichment
If enabled, perform formula OCR, return LaTeX code. Boolean. Optional, defaults to false. -
getDoPictureClassification
If enabled, classify pictures in documents. Boolean. Optional, defaults to false. -
getDoPictureDescription
If enabled, describe pictures in documents. Boolean. Optional, defaults to false. -
getPictureDescriptionAreaThreshold
Minimum percentage of the area for a picture to be processed with the models. -
getPictureDescriptionLocal
Options for running a local vision-language model in the picture description. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with picture_description_api. -
getPictureDescriptionApi
API details for using a vision-language model in the picture description. This parameter is mutually exclusive with picture_description_local. -
getVlmPipelineModel
Preset of local and API models for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model_api. Use the other options for more parameters. -
getVlmPipelineModelLocal
Options for running a local vision-language model for the vlm pipeline. The parameters refer to a model hosted on Hugging Face. This parameter is mutually exclusive with vlm_pipeline_model_api and vlm_pipeline_model. -
getVlmPipelineModelApi
API details for using a vision-language model for the vlm pipeline. This parameter is mutually exclusive with vlm_pipeline_model_local and vlm_pipeline_model. -
toString
-