Sats.Core.HTMLToPdf 1.0.0

dotnet add package Sats.Core.HTMLToPdf --version 1.0.0                
NuGet\Install-Package Sats.Core.HTMLToPdf -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Sats.Core.HTMLToPdf" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Sats.Core.HTMLToPdf --version 1.0.0                
#r "nuget: Sats.Core.HTMLToPdf, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Sats.Core.HTMLToPdf as a Cake Addin
#addin nuget:?package=Sats.Core.HTMLToPdf&version=1.0.0

// Install Sats.Core.HTMLToPdf as a Cake Tool
#tool nuget:?package=Sats.Core.HTMLToPdf&version=1.0.0                
    #USAGE

    var url = @"d:\convert.html";
    var chromePath = @"C:\Program Files\Google\Chrome\Application\chrome.exe";

    var output = new ChromeOptions().AddOptions(b =>
                        {
                            b.Headless();
                            b.DisableGPU();
                            b.WithoutHeader();

                        }).ToPdf(new ChromeDetails()
                        {
                            ChromePath = chromePath,
                            HtmlPath = url,
                            DeleteOutputFile = true, //optional
                           // OutputPath = @"d:\print.pdf" // (add if Environment.CurrentDirectory does not have access rights)
                        });


    File.WriteAllBytes(@"d:\print.pdf", output.FileDetails.File);

#For Web Application (or after release)# Go to yourapplication pool → Advanced Settings --> Process Model --> Set Identity to Local

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Sats.Core.HTMLToPdf:

Package Downloads
Meddata.LibraryHelpers

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 842 10/2/2021

Usage   
var url = @"d:\convert.html";
   var chromePath = @"C:\Program Files\Google\Chrome\Application\chrome.exe";

   var output = new ChromeOptions().AddOptions(b =>
                       {
                           b.Headless();
                           b.DisableGPU();
                           b.WithoutHeader();

                       }).ToPdf(new ChromeDetails()
                       {
                           ChromePath = chromePath,
                           HtmlPath = url,
                           DeleteOutputFile = true, //optional
                          // OutputPath = @"d:\print.pdf" // (add if Environment.CurrentDirectory does not have access rights)
                       });


   File.WriteAllBytes(@"d:\print.pdf", output.FileDetails.File);