public class MarkdownSaveOptions extends SaveOptions
Represents options that control how presentation should be saved to markdown.
Example:Presentation pres = new Presentation(presentationFileName); try { FileOutputStream stream = new FileOutputStream("MdFileForGitHubFlavor"); try { MarkdownSaveOptions markdownSaveOptions = new MarkdownSaveOptions(); markdownSaveOptions.setShowHiddenSlides(true); markdownSaveOptions.setShowSlideNumber(true); markdownSaveOptions.setFlavor(Flavor.Github); markdownSaveOptions.setExportType(MarkdownExportType.Sequential); markdownSaveOptions.setNewLineType(NewLineType.Windows); markdownSaveOptions.setBasePath(documentResourcesPath); pres.save(stream, new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9}, SaveFormat.Md, markdownSaveOptions); } finally { if (stream != null) stream.close(); } } catch (Exception e) { } finally { if (pres != null) pres.dispose(); }
| Constructor and Description |
|---|
MarkdownSaveOptions()
Ctor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBasePath()
Specifies the base path where document with resources will be saved.
|
int |
getExportType()
Specifies markdown specification to convert presentation.
|
int |
getFlavor()
Specifies markdown specification to convert presentation.
|
int |
getHandleRepeatedSpaces()
Specifies how repeated regular space characters should be handled during Markdown export.
|
java.lang.String |
getImagesSaveFolderName()
Specifies folder name to save images.
|
int |
getNewLineType()
Specifies whether the generated document should have new lines \\r(Macintosh) of \\n(Unix) or \\r\\n(Windows).
|
boolean |
getRemoveEmptyLines()
If set to true, removes empty or whitespace-only lines from the final Markdown output.
|
boolean |
getShowComments()
Specifies whether the generated document should show comments or not.
|
boolean |
getShowHiddenSlides()
Specifies whether the generated document should include hidden slides or not.
|
boolean |
getShowSlideNumber()
Specifies whether the generated document should show number of each slide or not.
|
java.lang.String |
getSlideNumberFormat()
Gets or sets the format string used for slide number headers in Markdown output.
|
void |
setBasePath(java.lang.String value)
Specifies the base path where document with resources will be saved.
|
void |
setExportType(int value)
Specifies markdown specification to convert presentation.
|
void |
setFlavor(int value)
Specifies markdown specification to convert presentation.
|
void |
setHandleRepeatedSpaces(int value)
Specifies how repeated regular space characters should be handled during Markdown export.
|
void |
setImagesSaveFolderName(java.lang.String value)
Specifies folder name to save images.
|
void |
setNewLineType(int value)
Specifies whether the generated document should have new lines \\r(Macintosh) of \\n(Unix) or \\r\\n(Windows).
|
void |
setRemoveEmptyLines(boolean value)
If set to true, removes empty or whitespace-only lines from the final Markdown output.
|
void |
setShowComments(boolean value)
Specifies whether the generated document should show comments or not.
|
void |
setShowHiddenSlides(boolean value)
Specifies whether the generated document should include hidden slides or not.
|
void |
setShowSlideNumber(boolean value)
Specifies whether the generated document should show number of each slide or not.
|
void |
setSlideNumberFormat(java.lang.String value)
Gets or sets the format string used for slide number headers in Markdown output.
|
getDefaultRegularFont, getGradientStyle, getProgressCallback, getSkipJavaScriptLinks, getWarningCallback, setDefaultRegularFont, setGradientStyle, setProgressCallback, setSkipJavaScriptLinks, setWarningCallbackpublic final int getExportType()
Specifies markdown specification to convert presentation.
Default is TextOnly.
public final void setExportType(int value)
Specifies markdown specification to convert presentation.
Default is TextOnly.
public final java.lang.String getBasePath()
Specifies the base path where document with resources will be saved. Default is the current directory of the application.
public final void setBasePath(java.lang.String value)
Specifies the base path where document with resources will be saved. Default is the current directory of the application.
public final java.lang.String getImagesSaveFolderName()
Specifies folder name to save images.
Default is Images.
public final void setImagesSaveFolderName(java.lang.String value)
Specifies folder name to save images.
Default is Images.
public final int getNewLineType()
Specifies whether the generated document should have new lines \\r(Macintosh) of \\n(Unix) or \\r\\n(Windows).
Default is Unix.
public final void setNewLineType(int value)
Specifies whether the generated document should have new lines \\r(Macintosh) of \\n(Unix) or \\r\\n(Windows).
Default is Unix.
public final boolean getShowComments()
Specifies whether the generated document should show comments or not. Default is false.
public final void setShowComments(boolean value)
Specifies whether the generated document should show comments or not. Default is false.
public final boolean getShowHiddenSlides()
Specifies whether the generated document should include hidden slides or not. Default is false.
public final void setShowHiddenSlides(boolean value)
Specifies whether the generated document should include hidden slides or not. Default is false.
public final boolean getShowSlideNumber()
Specifies whether the generated document should show number of each slide or not. Default is false.
public final void setShowSlideNumber(boolean value)
Specifies whether the generated document should show number of each slide or not. Default is false.
public final int getFlavor()
Specifies markdown specification to convert presentation.
Default is Multi-markdown.
public final void setFlavor(int value)
Specifies markdown specification to convert presentation.
Default is Multi-markdown.
public final java.lang.String getSlideNumberFormat()
Gets or sets the format string used for slide number headers in Markdown output. The format must include the "{0}" placeholder, which will be replaced with the slide index during export. Example: "# Slide {0}" will produce "# Slide 1", "# Slide 2", etc.
com.aspose.ms.System.ArgumentNullException - Thrown if the provided value is null or empty.com.aspose.ms.System.ArgumentException - Thrown if the format string does not contain the "{0}" placeholder.public final void setSlideNumberFormat(java.lang.String value)
Gets or sets the format string used for slide number headers in Markdown output. The format must include the "{0}" placeholder, which will be replaced with the slide index during export. Example: "# Slide {0}" will produce "# Slide 1", "# Slide 2", etc.
com.aspose.ms.System.ArgumentNullException - Thrown if the provided value is null or empty.com.aspose.ms.System.ArgumentException - Thrown if the format string does not contain the "{0}" placeholder.public final int getHandleRepeatedSpaces()
Specifies how repeated regular space characters should be handled during Markdown export.
This property defines whether consecutive spaces are:
- preserved as regular space characters,
- alternated between regular spaces and non-breaking space entities ( ),
- or fully replaced (after the first) with a non-breaking space to preserve visual alignment in Markdown output.
The default value is HandleRepeatedSpaces.AlternateSpacesToNbsp.
public final void setHandleRepeatedSpaces(int value)
Specifies how repeated regular space characters should be handled during Markdown export.
This property defines whether consecutive spaces are:
- preserved as regular space characters,
- alternated between regular spaces and non-breaking space entities ( ),
- or fully replaced (after the first) with a non-breaking space to preserve visual alignment in Markdown output.
The default value is HandleRepeatedSpaces.AlternateSpacesToNbsp.
public final boolean getRemoveEmptyLines()
If set to true, removes empty or whitespace-only lines from the final Markdown output. Default is false.
public final void setRemoveEmptyLines(boolean value)
If set to true, removes empty or whitespace-only lines from the final Markdown output. Default is false.
Copyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.