html to pdf C# යුස් කරන libraries මොනවද?

CorD SaC

Well-known member
  • Feb 4, 2015
    15,761
    28,118
    113

    මම දෙක තුනක්ම ට්‍රයි කලා, IronPdf , iTextSharp. IronPdf එක තරම් එකක් සෙට් උනේ නෑ, ඒත් ඒකෙ පීඩීෆ් එකත් එක්ක වෝටර් මාර්ක් එකක් ඇඩ් වෙනවනෙ. හොඳ ෆ්‍රී එකක් කියන්නකො
     
    • Like
    Reactions: IreshMM

    dilw

    Well-known member
  • May 13, 2015
    2,525
    1
    2,388
    113
    <html>
    <head>
    <script language="javascript">
    function printdiv(printpage) {
    var headstr = "<html><head><title></title></head><body>";
    var footstr = "</body>";
    var newstr = document.all.item(printpage).innerHTML;
    var oldstr = document.body.innerHTML;
    document.body.innerHTML = headstr + newstr + footstr;
    window.print();
    document.body.innerHTML = oldstr;
    return false;
    }
    </script>

    <title>div print</title>

    </head>

    <body>
    //HTML Page //Other content you wouldn't like to print
    <input name="b_print" type="button" class="ipt" onClick="printdiv('div_print');" value=" Print ">

    <div id="div_print">
    <h1 style="Color:Red">The Div content which you want to print</h1>
    </div>
    //Other content you wouldn't like to print //Other content you wouldn't like to print
    </body>
    </html>
     

    CorD SaC

    Well-known member
  • Feb 4, 2015
    15,761
    28,118
    113
    <html>
    <head>
    <script language="javascript">
    function printdiv(printpage) {
    var headstr = "<html><head><title></title></head><body>";
    var footstr = "</body>";
    var newstr = document.all.item(printpage).innerHTML;
    var oldstr = document.body.innerHTML;
    document.body.innerHTML = headstr + newstr + footstr;
    window.print();
    document.body.innerHTML = oldstr;
    return false;
    }
    </script>

    <title>div print</title>

    </head>

    <body>
    //HTML Page //Other content you wouldn't like to print
    <input name="b_print" type="button" class="ipt" onClick="printdiv('div_print');" value=" Print ">

    <div id="div_print">
    <h1 style="Color:Red">The Div content which you want to print</h1>
    </div>
    //Other content you wouldn't like to print //Other content you wouldn't like to print
    </body>
    </html>

    Backend ලබ්‍රි එකක් මචන් ඕනි, memory stream එකට දාලා එක යූස් කරලා ඊමේල් ඇටැච්මන්ට් එකක් යවාගන්න.

    is it for a web application?

    Yup it's microservices based web application, my requirement is need to generate pdf based on some html template and send email with attachment.

    Thanks bro. 'll try
     

    dilw

    Well-known member
  • May 13, 2015
    2,525
    1
    2,388
    113
    Backend ලබ්‍රි එකක් මචන් ඕනි, memory stream එකට දාලා එක යූස් කරලා ඊමේල් ඇටැච්මන්ට් එකක් යවාගන්න.

    ah eka nm danne na bn, hamba unoth meke update ekak dahan matath watinawa