PDFConvert 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package PDFConvert --version 1.0.1
                    
NuGet\Install-Package PDFConvert -Version 1.0.1
                    
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="PDFConvert" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PDFConvert" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="PDFConvert" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add PDFConvert --version 1.0.1
                    
#r "nuget: PDFConvert, 1.0.1"
                    
#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.
#:package PDFConvert@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=PDFConvert&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=PDFConvert&version=1.0.1
                    
Install as a Cake Tool

PDFConverter

🚀 PDFConvert.Engine is a high-performance .NET library that converts PDF documents into self-contained HTML pages by rasterizing each page into an <img> element.

🔧 What It Uses

  • PDFium → for PDF rendering (opens and rasterizes PDF pages).
  • SkiaSharp → for image encoding (WebP, PNG, JPEG).
  • WebMarkupMin → for HTML minification (smaller, optimized output).

✨ Features

  • Convert PDFs into single standalone HTML files.
  • Each page rendered as an <img> (WebP, PNG, or JPEG).
  • DPI scaling → control sharpness and file size.
  • Quality control (1–100) for WebP/JPEG output.
  • Grayscale mode for minimal file size and clean monochrome output.
  • Lazy loading and async decoding for browser performance.
  • Built-in HTML minification (compact and production-ready).

🚀 Usage Example

using PDFConvert.Engine;
using PDFConvert.Engine.Enums;

// Load PDF as bytes
byte[] pdfBytes = File.ReadAllBytes("sample.pdf");

// Convert to HTML
string html = PDFConverter.PdfToHtmlRaster(
    pdfBytes,
    dpi: 144,                  // resolution (default: 144)
    quality: 100,              // image quality (default: 100)
    imageFormat: ImageFormat.webp, // webp/png/jpeg
    grayscale: false           // grayscale rendering (default: false)
);

// Save result
File.WriteAllText("output.html", html);
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 257 9/3/2025
1.0.2 179 9/3/2025
1.0.1 204 9/2/2025
1.0.0 183 9/1/2025

Updating the build pattern to add the dll automaticly