Converting a document from Markdown to PDF format
GdPicture supports Markdown as an input document format. You can load Markdown files and process them through the same pipeline you use for other formats.
This guide shows how to:
- Load a Markdown file
- Convert Markdown content to PDF
Supported Markdown content includes headers, lists, code blocks, tables, and inline formatting.
Prepare the project
Register the SDK license before you run document operations:
using GdPicture14;
LicenseManager licence = new LicenseManager();licence.RegisterKEY(""); // Set your license keyLoad the Markdown document
Create a document converter and load the Markdown file, specifying the Markdown document format:
using GdPictureDocumentConverter converter = new GdPictureDocumentConverter();converter.LoadFromFile(@"input.md", GdPicture14.DocumentFormat.DocumentFormatMD);Convert to PDF
Save the loaded Markdown content as PDF:
converter.SaveAsPDF(@"output.pdf");Conclusion
This workflow treats Markdown as a standard document input and converts it to PDF with the same SDK conversion flow used for other formats.