Are there any asp core package which can convert Markdown to PDF?
2 Answers
Syncfusion .NET Core Word library (DocIO) allows you to create, edit, modify, and convert Word documents. Using this, you can also convert Markdown to Word document and PDF.
Refer the below sample link for converting Markdown to PDF : GitHub sample to convert Markdown to PDF
UG documentation: Markdown to Word conversion, Word to PDF conversion
Online demo: Syncfusion .NET Core Word library - Online demos
Syncfusion offers a free community license also. https://www.syncfusion.com/products/communitylicense
Note: I work for Syncfusion
Spire.Doc for .NET is capable of converting Markdown to other file formats like PDF and Word.
The following is a code example of how you can utilize it to convert a Markdown file to PDF:
using Spire.Doc;
namespace MdToPDF
{
class Program
{
static void Main(string[] args)
{
// Create an object of Document class
Document doc = new Document();
// Load a Markdown file
doc.LoadFromFile("Sample.md", FileFormat.Markdown);
// Convert the Markdown file to a PDF file
doc.SaveToFile("MarkdownToPDF.pdf", FileFormat.PDF);
doc.Close();
}
}
}