Converter.ConvertMarkdown

ConvertMarkdown(Stream, string)

Convert MD (markdown) source presented by input stream to html. Result is HTMLDocument which can be saved through output file path.

public static HTMLDocument ConvertMarkdown(Stream stream, string baseUri)
ParameterTypeDescription
streamStreamMD (Markdown) conversion input data stream.
baseUriStringThe base URI of the document. It will be combined with the current directory path to form an absolute URL.

Return Value

New formed HTMLDocument as conversion result which can be saved through output file path.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");
       
      // Open source file as stream
      using (var sourceStream = File.OpenRead(sourcePath))
      {
        // Initiate conversion process
        var document = Converter.ConvertMarkdown(sourceStream, string.Empty);
         
        // Save conversion result
        document.Save(resultPath);
      }





*InputFolder - user source folder path.

*OutputFolder - user output file path.

See Also


ConvertMarkdown(Stream, string, Configuration)

Convert MD (markdown) source presented by input stream to html. Result is HTMLDocument which can be saved through output file path.

public static HTMLDocument ConvertMarkdown(Stream stream, string baseUri, 
    Configuration configuration)
ParameterTypeDescription
streamStreamMD (Markdown) conversion input data stream.
baseUriStringThe base URI of the document. It will be combined with the current directory path to form an absolute URL.
configurationConfigurationThe environment configuration. Represents the configuration context object that is used to set up the environment settings for the application.

Return Value

New formed HTMLDocument as conversion result which can be saved through output file path.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");

      // Open source file as stream
      using (var sourceStream = File.OpenRead(sourcePath))
      {
        // Initiate conversion process with default configuration
        var document = Converter.ConvertMarkdown(sourceStream, string.Empty, new Configuration());

        // Save conversion result
        document.Save(resultPath);
      }





*InputFolder - user source folder path.

*OutputFolder - user output file path.

See Also


ConvertMarkdown(Stream, string, string)

Convert MD (markdown) source presented by input stream to html. Result is html file formed by output file path.

public static void ConvertMarkdown(Stream stream, string baseUri, string outputPath)
ParameterTypeDescription
streamStreamMD (Markdown) conversion input data stream.
baseUriStringThe base URI of the document. It will be combined with the current directory path to form an absolute URL.
outputPathStringFull html file path as output conversion result.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");

      // Open source file as stream
      using (var sourceStream = File.OpenRead(sourcePath))
      {
        // Initiate conversion process
        Converter.ConvertMarkdown(sourceStream, string.Empty, resultPath);
      }





*InputFolder - user source folder path.

*OutputFolder - user output file path.

See Also


ConvertMarkdown(Stream, string, Configuration, string)

Convert MD (markdown) source presented by input stream to html. Result is html file formed by output file path.

public static void ConvertMarkdown(Stream stream, string baseUri, Configuration configuration, 
    string outputPath)
ParameterTypeDescription
streamStreamMD (Markdown) conversion input data stream.
baseUriStringThe base URI of the document. It will be combined with the current directory path to form an absolute URL.
configurationConfigurationThe environment configuration. Represents the configuration context object that is used to set up the environment settings for the application.
outputPathStringFull html file path as output conversion result.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");

      // Open source file as stream
      using (var sourceStream = File.OpenRead(sourcePath))
      {
        // Initiate conversion process with default configuration
        Converter.ConvertMarkdown(sourceStream, string.Empty, new Configuration(), resultPath);
      }

*InputFolder - user source folder path.

*OutputFolder - user output file path.

See Also


ConvertMarkdown(string)

Convert MD (markdown) source presented by full file path to html. Result is HTMLDocument which can be saved through output file path.

public static HTMLDocument ConvertMarkdown(string sourcePath)
ParameterTypeDescription
sourcePathStringMD (Markdown) source full file path.

Return Value

New formed HTMLDocument as conversion result which can be saved through output file path.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");

      // Initiate conversion process
      using (HTMLDocument document = Converter.ConvertMarkdown(sourcePath))
      {
        // Save conversion result as local file
        document.Save(resultPath);
      }

*InputFolder - user source template folder.

*OutputFolder - user output file path.

See Also


ConvertMarkdown(string, Configuration)

Convert MD (markdown) source presented by full file path to html. Result is HTMLDocument which can be saved through output file path.

public static HTMLDocument ConvertMarkdown(string sourcePath, Configuration configuration)
ParameterTypeDescription
sourcePathStringMD (Markdown) source full file path.
configurationConfigurationThe environment configuration. Represents the configuration context object that is used to set up the environment settings for the application.

Return Value

New formed HTMLDocument as conversion result which can be saved through output file path.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");

      // Initiate conversion process with default configuration
      using (HTMLDocument document = Converter.ConvertMarkdown(sourcePath, new Configuration()))
      {
        // Save conversion result as local file
        document.Save(resultPath);
      }

*InputFolder - user source template folder.

*OutputFolder - user output file path.

See Also


ConvertMarkdown(string, string)

Convert MD (markdown) source presented by full file path to html. Result is html file formed by output file path.

public static void ConvertMarkdown(string sourcePath, string outputPath)
ParameterTypeDescription
sourcePathStringPath to source Markdown file. It will be combined with the current directory path to form an absolute URL.
outputPathStringFull html file path as output conversion result.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");

      // Initiate conversion process
      Converter.ConvertMarkdown(sourcePath, resultPath);

*InputFolder - user source template folder.

*OutputFolder - user output file path.

See Also


ConvertMarkdown(string, Configuration, string)

Convert MD (markdown) source presented by full file path to html. Result is html file formed by output file path.

public static void ConvertMarkdown(string sourcePath, Configuration configuration, 
    string outputPath)
ParameterTypeDescription
sourcePathStringPath to source Markdown file. It will be combined with the current directory path to form an absolute URL.
configurationConfigurationThe environment configuration. Represents the configuration context object that is used to set up the environment settings for the application.
outputPathStringFull html file path as output conversion result.

Remarks

Markdown Converter

MD (Markdown) is a markup language with a plain-text-formatting syntax. Markdown is often used as a format for documentation and readme files since it allows writing in an easy-to-read and easy-to-write style. Its design allows it to be easily converted to many output formats, but initially it was created to convert only to HTML. Using the Aspose.HTML class library in your C# application, you can easily convert Markdown into an HTML file with just a few lines of code! Refer to article, where you find more information.

Conversion steps

Converter class offers few ways to convert MD to html wherein you should follow one of simple scenarios consists of few steps:

Conversion source. Detect an existing local MD file or create input data stream as conversion source.Conversion result. You can obtain directly HTMLDocument or define result output file path depend of method signature.Use the ConvertMarkdown() method of the Converter class to save MD as an html result. You can add also configuration as option parameter.Online MD converter

You may also be interested in a free online MD to HTML Converter that converts MD to HTML with high quality, easy and fast. Just upload, convert your files and get results in a few seconds! Also you can check other online MD converters: MD to PDF, MD to DOCX, MD to XPS and find appropriate MD to image converters.

Source code

You can download the complete examples and data files from GitHub.

Examples

using System.IO; 
using Aspose.Html.IO;
using Aspose.Html.Saving;  
using Aspose.Html.Converters;  
...
      // Form source file path
      var sourcePath = Path.Combine(InputFolder, "simple.md");

      // Form result file path
      var resultPath = Path.Combine(OutputFolder, "result.html");

      // Initiate conversion process with default configuration
      Converter.ConvertMarkdown(sourcePath, new Configuration(), resultPath);

*InputFolder - user source template folder.

*OutputFolder - user output file path.

See Also