public class DocumentConverterOptions extends LoadOptions
This class allows configuration of how documents are converted to Markdown, particularly how images are handled during the conversion process. By default, images are embedded as Base64 strings in the Markdown output.
// Example 1: Using default options (images embedded as Base64)
DocumentConverterOptions defaultOptions = new DocumentConverterOptions();
// Images will be embedded as Base64 strings in the Markdown
// Example 2: Saving images to a folder
DocumentConverterOptions fileSystemOptions = new DocumentConverterOptions();
fileSystemOptions.setImageExportStrategy(new ExportImagesToFileSystemStrategy("output/images"));
// Example 3: Skipping image export
DocumentConverterOptions skipImagesOptions = new DocumentConverterOptions();
skipImagesOptions.setImageExportStrategy(new SkipImagesStrategy());
// Example 4: Using a custom image export strategy
DocumentConverterOptions customOptions = new DocumentConverterOptions();
customOptions.setImageExportStrategy(new CustomImageExportStrategy());
| Constructor and Description |
|---|
DocumentConverterOptions()
Initializes a new instance of the
DocumentConverterOptions class. |
| Modifier and Type | Method and Description |
|---|---|
IImageExportStrategy |
getImageExportStrategy()
Gets the current image export strategy.
|
List<Integer> |
getPageNumbers()
Gets the array of page or worksheet numbers to convert.
|
void |
setImageExportStrategy(IImageExportStrategy imageExportStrategy)
Sets the image export strategy.
|
void |
setPageNumbers(List<Integer> pageNumbers)
Sets the array of page or worksheet numbers to convert.
|
getExtension, getFileFormat, getMimeType, getPassword, setExtension, setFileFormat, setMimeType, setPasswordpublic DocumentConverterOptions()
DocumentConverterOptions class.
By default, the getImageExportStrategy() is set to ExportImagesAsBase64Strategy,
which embeds images as Base64 strings directly in the Markdown output.
public IImageExportStrategy getImageExportStrategy()
public void setImageExportStrategy(IImageExportStrategy imageExportStrategy)
imageExportStrategy - The strategy to use for image export.public List<Integer> getPageNumbers()
null if not set.Copyright © 2026. All rights reserved.