This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/conversion/markdown-to-pdf.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Convert Markdown to PDF

Markdown is now a supported import format in GdPicture, enabling seamless integration of Markdown content into document processing workflows. Organizations can load Markdown files just like any other document format and convert them to PDF, render them as images, or display them in viewers. This capability brings Markdown into the same unified document processing pipeline as Word, Excel, and other supported formats.

The Markdown import support handles standard Markdown syntax including headers, lists, code blocks, tables, and inline formatting. Once loaded, Markdown documents benefit from the same conversion and rendering capabilities available to other document formats, enabling consistent document processing regardless of source format.

Preparing the project

Initialize the SDK by registering your license key. This authentication step must occur before any document processing operations.

using GdPicture14;
LicenseManager licence = new LicenseManager();
licence.RegisterKEY(""); // Set your license key

The LicenseManager handles SDK authentication, enabling access to all document processing features including the new Markdown import capability.

Loading the Markdown document

Load the Markdown file using the document converter, specifying the Markdown format explicitly.

using GdPictureDocumentConverter converter = new GdPictureDocumentConverter();
converter.LoadFromFile(@"input.md", GdPicture14.DocumentFormat.DocumentFormatMD);

The GdPictureDocumentConverter treats Markdown as a first-class document format. By specifying DocumentFormat.DocumentFormatMD, the converter parses the Markdown syntax and prepares it for conversion or rendering operations.

Converting to PDF format

Convert the loaded Markdown content to PDF using the standard conversion method.

converter.SaveAsPDF(@"output.pdf");

The SaveAsPDF method renders the Markdown structure into formatted PDF content, applying appropriate styling to headers, lists, code blocks, and other elements. The conversion preserves document hierarchy and formatting while generating professional PDF output.

Conclusion

Markdown import support in GdPicture enables treating Markdown files as standard document format inputs. Once loaded, Markdown documents can be converted to PDF, rendered as images, or processed using the full range of SDK capabilities, providing flexibility for documentation workflows and content processing pipelines.