Markdown to PDF


i have a markdown text with text formating.
What is the best way to add this Markdown to a existing pdf?
The Text insert is after “Test Betreff” in a new line (same page)

Horst21110000001_SIDKC.pdf (77.1 KB)

The Markdwon:


Ein Test Text FETT mit KURSIV verschiedenen Unterstrichen Formatierungen




The API does allow you to import HTML text inside your PDF paragraph for any particular page. If that is required, you can consider using following sample code.

     public static void TestHTMLMarkdown()
        var pdfDocument = new Document(path+ "21110000001_SIDKC.pdf");
        var page = pdfDocument.Pages[1];//.Add();
        string htmlstring1 = "<b>1. </b><div style='margin-top:-20px;margin-left:35px; width: 580px'><b>Blank1 petitions:</b>&nbsp;&nbsp;The Committee will consider the following petitions&mdash;<p style=\"margin-left:30px;\">[AY12345] Introduce a law to allow pets in rented and supported accommodation<br />[AY12345] Access to specialist support for hidradenitis suppurativa sufferers in Scotland<br />[AY12345] Change the law to allow adoption for people over the age of 18<br /></p><br><br><br><br><br><br></div>";
        HtmlFragment agendaTextHtml = new HtmlFragment(htmlstring1);

        pdfDocument.Save(path + "SavedwithHtml.pdf");//, SaveFormat.Pdf);

i convert my test markdown to html and add this with your sample to the pdf.
It´s working - thanks for the tip
The convert HTML:

<p>Ein Test Text <strong>&nbsp;FETT</strong> mit <em>KURSIV</em> verschiedenen <u>Unterstrichen</u> Formatierungen</p>


It’s good to know that suggested option has proved to be working on your end.