Class ConversionOptions.Builder

java.lang.Object
io.github.cyber655.markitdown.ConversionOptions.Builder
Enclosing class:
ConversionOptions

public static final class ConversionOptions.Builder extends Object
Builder for ConversionOptions.
  • Method Details

    • extensionHint

      public ConversionOptions.Builder extensionHint(String extension)
      Hint about the file extension (maps to -x). Useful when converting raw bytes or a stream that has no filename. A leading dot is optional.
    • mimeTypeHint

      public ConversionOptions.Builder mimeTypeHint(String mimeType)
      Hint about the file's MIME type, e.g. application/pdf (maps to -m).
    • charsetHint

      public ConversionOptions.Builder charsetHint(String charset)
      Hint about the file's charset, e.g. UTF-8 (maps to -c).
    • usePlugins

      public ConversionOptions.Builder usePlugins(boolean usePlugins)
      Enables third-party MarkItDown plugins (maps to -p).
    • keepDataUris

      public ConversionOptions.Builder keepDataUris(boolean keepDataUris)
      Keeps data URIs (such as base64-encoded images) in the output instead of truncating them (maps to --keep-data-uris).
    • documentIntelligence

      public ConversionOptions.Builder documentIntelligence(String endpoint)
      Uses Azure Document Intelligence for extraction (maps to -d -e <endpoint>). Mutually exclusive with contentUnderstanding(String).
    • contentUnderstanding

      public ConversionOptions.Builder contentUnderstanding(String endpoint)
      Uses Azure Content Understanding for extraction (maps to --use-cu --cu-endpoint <endpoint>). Mutually exclusive with documentIntelligence(String).
    • contentUnderstandingAnalyzer

      public ConversionOptions.Builder contentUnderstandingAnalyzer(String analyzerId)
      Content Understanding analyzer id (maps to --cu-analyzer).
    • contentUnderstandingFileTypes

      public ConversionOptions.Builder contentUnderstandingFileTypes(String... fileTypes)
      File types to route to Content Understanding, e.g. pdf, jpeg, mp4 (maps to --cu-file-types).
    • build

      public ConversionOptions build()
      Builds the immutable options instance.