1. Home
  2. /
  3. GroupDocs.Conversion.LowCode
  4. /
  5. GroupDocs.Conversion.LowCode
  6. /
  7. PdfToMdConverter

PdfToMdConverter class

Provides a simple API to convert PDF documents to Markdown (MD) format using the GroupDocs.Conversion LowCode interface.

This converter is part of the LowCode API, which allows you to perform PDF to MD conversions with minimal code and configuration.

Features:

  • Convert PDF files to Markdown (MD) with high fidelity
  • Support for password-protected PDF documents
  • Customize loading and conversion via PdfLoadOptions and WordProcessingConvertOptions
  • Stream and file-based conversion support

Code Examples:

See the LowCode developer guide for more details: https://docs.groupdocs.net/conversion/developer-guide/

public sealed class PdfToMdConverter : Converter<PdfLoadOptions, WordProcessingConvertOptions>

Public Members

namedescription
PdfToMdConverter(…)Initializes a new instance of the PdfToMdConverter class for converting PDF documents to Markdown (MD). (2 constructors)
Convert(…)Converts the loaded PDF document to Markdown (MD) and saves it to the specified file path. (2 methods)

Remarks

Example - Basic conversion:

using GroupDocs.Conversion.LowCode;

// Load license keys
var publicKey = Environment.GetEnvironmentVariable("GD_PUBLIC_KEY");
var privateKey = Environment.GetEnvironmentVariable("GD_PRIVATE_KEY");

// Apply the license
License.Set(publicKey, privateKey);

// Create a converter for the PDF file
var converter = new PdfToMdConverter("document.pdf");

// Convert PDF to Markdown
converter.Convert("document.md");

Example - Advanced conversion with options:

var converter = new PdfToMdConverter("protected.pdf", options =>
{
    options.Password = "12345";
    options.FlattenAllFields = true;
    options.HidePdfAnnotations = true;
});
converter.Convert("document.md", convertOptions =>
{
    convertOptions.Pages = new List<int> { 1, 2, 3 };
});

See Also