Convert from HTML to PDF in ASP.NET Core with a Free 3rd Party Library

Html to Pdf Conversion is now available for .NET Core. SelectPdf offers a Community Edition (FREE) of the powerful Html To Pdf Converter for .NET Core that can be found in the full featured pdf library.

C# (1.6 MB)
 
 
 
 
 
4.3 Star
(4)
2,058 times
Add to favorites
5/10/2019
E-mail Twitter del.icio.us Digg Facebook

Solution explorer

C#
@page
@model SelectPdf.Samples.Pages.PdfConverterSecurityModel
@{
    Layout = "~/Pages/_Layout.cshtml";
    ViewData["Title"] = "SelectPdf Free Html To Pdf Converter for .NET Core - Pdf Security Settings with Html To Pdf Converter - C# / ASP.NET Core MVC6";
    ViewData["Description"] = "SelectPdf Pdf Security Settings with Html To Pdf Converter Sample for C# ASP.NET MVC. Pdf Library for .NET with full sample code in C# and VB.NET.";
    ViewData["Keywords"] = "pdf security, pdf library, sample code, html to pdf, pdf converter";
}

<form method="post">
    <article class="post type-post status-publish format-standard hentry">
        <header class="entry-header">
            <h1 class="entry-title">SelectPdf Free Html To Pdf Converter for .NET Core - Pdf Security Settings with Html To Pdf Converter - C# / ASP.NET Core MVC6 Sample</h1>
        </header>
        <!-- .entry-header -->

        <div class="entry-content">
            <p>
                This sample shows how to convert from html to pdf using SelectPdf, how to set a password to be able to view or
                modify the document and also specify user permissions for the pdf document (if the user can print, copy content, fill forms, modify, etc).
            </p>
            <p>
                Url:<br />
                <input type="text" style="width: 90%;" value="https://selectpdf.com" asp-for="TxtUrl" />
            </p>
            <div class="col2">
                User Password:<br />
                <input type="text" asp-for="TxtUserPassword" /><br />
                <br />
                Owner Password:<br />
                <input type="text" asp-for="TxtOwnerPassword" /><br />
                <br />
            </div>
            <div class="col2">
                <input type="checkbox" asp-for="ChkCanAssembleDocument" checked /> Allow Assemble Document<br />
                <input type="checkbox" asp-for="ChkCanCopyContent" checked /> Allow Copy Content<br />
                <input type="checkbox" asp-for="ChkCanEditAnnotations" checked /> Allow Edit Annotations<br />
                <input type="checkbox" asp-for="ChkCanEditContent" checked /> Allow Edit Content<br />
                <input type="checkbox" asp-for="ChkCanFillFormFields" checked />  Fill Form Fields<br />
                <input type="checkbox" asp-for="ChkCanPrint" checked /> Allow Print<br />
                <br />
            </div>
            <div class="col-clear"></div>
            <p>
                <input type="submit" id="BtnCreatePdf" value="Create PDF" class="mybutton" />
            </p>
        </div>
        <!-- .entry-content -->
    </article>
    <!-- #post -->
</form>