Tools/Utilities NReco PdfGenerator (C# WkHtmlToPdf wrapper) - All Here

emailx45

Местный
Регистрация
5 Май 2008
Сообщения
3,571
Реакции
2,439
Credits
574
NReco PdfGenerator (C# WkHtmlToPdf wrapper)
more info Для просмотра ссылки Войди или Зарегистрируйся
NReco-PdfGenerator.jpg


HTML-to-PDF Generator for .NET C# WkHtmlToPdf wrapper
  • NReco PdfGenerator is the name of the software application for format conversion. With this software you will be able to convert HTML and Web pages into a PDF file.
  • The feature and feature feature of this software is the ability to turn perfect and perfect web pages.
  • This software is able to read CSS languages, images, various web fonts and javascript code.
  • For this reason, you can safely convert various HTML pages to PDF.
  • More than 99% of the conversions that are made with this software are successful and the converted version has the same quality as the web page version.
  • Converting pages to PDF documents in this software is very simple.
  • You can convert your desired format to just a few simple and trivial clicks. Also, the NReco PdfGenerator software also has many features that, if you intend to make changes, can help you make these changes as easy as the tools in this software.
Features on Convert HTML to PDF in C#:
  • Create PDF from HTML page with one line of C# code.
    • Full support of complex layout, CSS, images/svg, custom fonts, javascript code.
  • Precise rendering: in 99% cases PDF result is identical to the web browser view:
  • Simplest way to generate PDF from .NET applications (ASP.NET, ASP.NET MVC, WebForms, .NET Core, VB.NET):
    • create PDF from HTML string, file or URL
    • convert ASPX to PDF, MVC view to PDF
    • merge several HTML pages (files, URLs) into one resulting PDF
  • PDF options:
    • page orientation, custom page size, page margins
    • HTML template for page header/footer, page numbering, cover page
    • automatic table of contents generation by headings (H1/H2/H3)
  • Stable and time-proven solution for C# HTML to PDF conversion: all you need is one .NET assembly (wkhtmltopdf binaries are embedded into DLL).
  • Has .NET Core compatible version: Для просмотра ссылки Войди или Зарегистрируйся.
  • PdfGenerator C# examples package:
    • DataSetReport: generates PDF with data table from DataSet using XSLT
    • DemoMvc: generate PDF from ASP.NET MVC views. Illustrates: page breaks, multi-page tables, cover page and table-of-contents, custom header/footer with page numbering
    • DemoWebForms: generate PDF from textarea (online demo)
    • EncryptPdf: how to generate secured (password protected) PDF
    • MergePdf: produce several PDFs and merge whem into one file with iTextSharp
    • PdfFromFiles: generate one PDF from several HTML documents (files, URLs)
    • WatermarkPdf: how to generate PDF and watermark it with background image or text (Для просмотра ссылки Войди или Зарегистрируйся)
    • BatchMode: optimized generation of several PDF documents in the batch mode
  • PdfGenerator converts HTML page (with full CSS / images / js support) to PDF file with one line of C# code.
  • Don't spend your time and money on WkHtmlToPDF integration into your .NET application: it's already done!
  1. Download free package and add reference to the NReco.PdfGenerator.dll assembly OR install Для просмотра ссылки Войди или Зарегистрируйся
  2. Convert HTML to PDF with C# code:
  3. HTML:
    var htmlContent = String.Format("<body>Hello world: {0}</body>", DateTime.Now);
    var htmlToPdf = new NReco.PdfGenerator.HtmlToPdfConverter();
    var pdfBytes = htmlToPdf.GeneratePdf(htmlContent);
  4. Create PDF from HTML file or URL (WebForms, MVC page):
  5. HTML:
    htmlToPdf.GeneratePdfFromFile("http://www.nrecosite.com/", null, "export.pdf");
  6. That's all! See also Для просмотра ссылки Войди или Зарегистрируйся.
HTML:
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style>table { border:1px solid silver; border-collapse:collapse;} table td { border-bottom:1px solid silver; }</style>
</head>
    <body>
        <h1 style="text-align:center;">Order #17</h1>
        <div style="float:left;">
            Donald<br />
            XXXXXX Park Avenue<br />
            Big City<br /><br />
            Date: 8/25/2018
        </div>
        <div style="float:right;">
            <div style="border:1px solid gray;padding:10px;">
                A company<br />
                321 City Street<br />
                Industry Park<br />
                Another Country
            </div>
        </div>
        <div style="clear:both;"></div>
        <br /><br />
        Ordered items list:
        <table width="100%" style="margin-bottom:20px;">
            <tr>
                <td>T-shirt</td>
                <td>4</td>
                <td>$44</td>
            </tr>
            <tr>
                <td>Coffee cup</td>
                <td>5</td>
                <td>$25</td>
            </tr>
            <tr>
                <td colspan="2" align="right">Total:</td>
                <td>$69</td>
            </tr>
        </table>
        <div style="float:right;">
            Signed: Saturday, August 25, 2018 4:11 PM<br />
            From IP: XXX.XXX.XXX.XXX
            Signature:<br />
            <img src="https://www.nrecosite.com/img/pdfgenerator/donald_sign.jpg"/>
        </div>
        <div style="float:left;">Sincerely,<br />Donald</div>
        <div style="clear:both;"></div>
    </body>
</html>

FAQ:
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
[SHOWTOGROUPS=4,19,20]
Для просмотра ссылки Войди или Зарегистрируйся
[/SHOWTOGROUPS]