public class MarkdownConverter extends Object implements AutoCloseable
| Constructor and Description |
|---|
MarkdownConverter(InputStream sourceStream)
Create converter from an InputStream.
|
MarkdownConverter(InputStream sourceStream,
LoadOptions providedLoadOptions)
Create converter from an InputStream + optional LoadOptions.
|
MarkdownConverter(String sourcePath)
Create converter from a file path.
|
MarkdownConverter(String sourcePath,
LoadOptions providedLoadOptions)
Create converter from a file path with explicit load options.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close and release resources.
|
DocumentConverterResult |
convert()
Convert to Markdown and return result string.
|
DocumentConverterResult |
convert(DocumentConverterOptions converterOptions)
Convert with explicit options and return markdown string.
|
DocumentConverterResult |
convert(OutputStream outputStream)
Convert and write result to provided OutputStream.
|
DocumentConverterResult |
convert(OutputStream outputStream,
DocumentConverterOptions converterOptions)
Convert with explicit options to provided OutputStream.
|
DocumentConverterResult |
convertToFile(String outputFilePath)
Convert and save to file path.
|
DocumentConverterResult |
convertToFile(String outputFilePath,
DocumentConverterOptions converterOptions)
Convert with explicit options and save to a file path.
|
com.groupdocs.markdown.licensing.IMeteredCounter |
getMeteredCounter()
Expose meteredCounter for tests or callers (if needed).
|
public MarkdownConverter(String sourcePath) throws IOException
sourcePath - path to source fileIllegalArgumentException - if sourcePath null/emptyFileNotFoundException - if file does not existUnsupportedOperationException - if file type can't be detected / no converterIOExceptionpublic MarkdownConverter(String sourcePath, LoadOptions providedLoadOptions) throws IOException
IOExceptionpublic MarkdownConverter(InputStream sourceStream) throws IOException
sourceStream - input stream (must not be null)IllegalArgumentException - if sourceStream nullUnsupportedOperationException - if file type can't be detected / no converterIOExceptionpublic MarkdownConverter(InputStream sourceStream, LoadOptions providedLoadOptions) throws IOException
IOExceptionpublic DocumentConverterResult convert()
public DocumentConverterResult convert(OutputStream outputStream)
public DocumentConverterResult convertToFile(String outputFilePath)
public DocumentConverterResult convert(DocumentConverterOptions converterOptions)
public DocumentConverterResult convert(OutputStream outputStream, DocumentConverterOptions converterOptions)
public DocumentConverterResult convertToFile(String outputFilePath, DocumentConverterOptions converterOptions)
public void close()
close in interface AutoCloseablepublic com.groupdocs.markdown.licensing.IMeteredCounter getMeteredCounter()
Copyright © 2026. All rights reserved.