ForgePDF.HtmlRenderer 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package ForgePDF.HtmlRenderer --version 1.0.0
                    
NuGet\Install-Package ForgePDF.HtmlRenderer -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="ForgePDF.HtmlRenderer" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ForgePDF.HtmlRenderer" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="ForgePDF.HtmlRenderer" />
                    
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 ForgePDF.HtmlRenderer --version 1.0.0
                    
#r "nuget: ForgePDF.HtmlRenderer, 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.
#:package ForgePDF.HtmlRenderer@1.0.0
                    
#: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=ForgePDF.HtmlRenderer&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=ForgePDF.HtmlRenderer&version=1.0.0
                    
Install as a Cake Tool

ForgePDF AI

.NET License Status

Enterprise-grade AI-powered PDF rendering and document conversion engine for .NET.

ForgePDF AI supports:

  • HTML to PDF
  • HTML Parts to PDF
  • Word (.docx) to PDF
  • Excel (.xlsx) to PDF
  • PowerPoint (.pptx) to PDF
  • Multilingual rendering
  • RTL language support
  • Large file rendering
  • Parallel rendering
  • Streaming PDF generation
  • Enterprise concurrency handling

Features

HTML to PDF

Supports:

  • Full HTML documents
  • Inline CSS
  • External CSS
  • HTML fragments
  • Multiple HTML parts
  • Headers and footers
  • Title pages
  • Logo pages
  • Repeatable page headers
  • Repeatable page footers
  • Page numbering

Word to PDF

Supports:

  • DOCX parsing
  • Headings
  • Paragraphs
  • Lists
  • Bullets
  • Numbering
  • ATS resume conversion
  • Multi-page rendering

Excel to PDF

Supports:

  • XLSX worksheets
  • Auto-fit PDF tables
  • Multi-page sheet rendering
  • Header styling
  • Table borders
  • Large datasets

PowerPoint to PDF

Supports:

  • PPTX slides
  • Slide titles
  • Bullet points
  • PowerPoint tables
  • Styled slide rendering
  • Professional slide layouts

Enterprise Features

  • Multi-threaded rendering
  • High concurrency support
  • SemaphoreSlim coordination
  • Queue management
  • Streaming support
  • Parallel page rendering
  • Large document optimization
  • Configurable chunking
  • Configurable page size
  • Configurable margins
  • Auto font fallback
  • RTL rendering
  • Hybrid rendering mode

Supported Languages

  • English
  • Urdu
  • Arabic
  • Persian
  • Turkish
  • Hindi
  • Unicode text
  • RTL languages

Solution Structure

src/
 ├── ForgePDF.Core
 ├── ForgePDF.Threading
 ├── ForgePDF.Localization
 ├── ForgePDF.Html
 ├── ForgePDF.RichHtml
 ├── ForgePDF.Components
 ├── ForgePDF.AspNetCore
 ├── ForgePDF.Converters
 ├── ForgePDF.AI
 └── ForgePDF.Cli

samples/
 ├── Enterprise.MinimalApi
 └── LargeReport.Concurrent

tests/
 └── ForgePDF.UnitTests

Installation

Clone

git clone https://github.com/your-repo/ForgePDF.git
cd ForgePDF

Build

dotnet build

Run Sample API

dotnet run --project samples/Enterprise.MinimalApi

Minimal API Example

using ForgePDF.Core;
using ForgePDF.Threading;
using ForgePDF.AspNetCore;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddForgePdf(options =>
{
    options.MaxConcurrentDocuments = Environment.ProcessorCount;
    options.QueueTimeout = TimeSpan.FromSeconds(30);
});

var app = builder.Build();

app.MapPost("/convert/html-to-pdf", async (
    HtmlToPdfRequest request,
    DocumentConversionService converter) =>
{
    var result = await converter.ConvertHtmlAsync(request);

    return Results.File(
        result.Bytes,
        "application/pdf",
        result.FileName);
});

app.Run();

HTML to PDF Example

var result = await converter.ConvertHtmlAsync(new HtmlToPdfRequest
{
    Html = """
    <html>
        <body>
            <h1>ForgePDF AI</h1>
            <p>Enterprise HTML to PDF rendering.</p>
        </body>
    </html>
    """,
    FileName = "report.pdf"
});

HTML Parts Example

var result = await converter.ConvertHtmlPartsAsync(
    new HtmlPartsToPdfRequest
    {
        HtmlParts =
        [
            "<h1>Part 1</h1>",
            "<h2>Part 2</h2>"
        ],
        CssParts =
        [
            "body { font-family: Arial; }"
        ],
        FileName = "parts.pdf"
    });

Word to PDF Example

var bytes = await File.ReadAllBytesAsync("resume.docx");

var result = await converter.ConvertFileAsync(
    new FileToPdfRequest
    {
        Kind = ForgeDocumentKind.WordDocx,
        Base64File = Convert.ToBase64String(bytes),
        OutputFileName = "resume.pdf"
    });

Excel to PDF Example

var bytes = await File.ReadAllBytesAsync("orders.xlsx");

var result = await converter.ConvertFileAsync(
    new FileToPdfRequest
    {
        Kind = ForgeDocumentKind.ExcelXlsx,
        Base64File = Convert.ToBase64String(bytes),
        OutputFileName = "orders.pdf"
    });

PowerPoint to PDF Example

var bytes = await File.ReadAllBytesAsync("deck.pptx");

var result = await converter.ConvertFileAsync(
    new FileToPdfRequest
    {
        Kind = ForgeDocumentKind.PowerPointPptx,
        Base64File = Convert.ToBase64String(bytes),
        OutputFileName = "deck.pdf"
    });

CLI Usage

HTML

dotnet run --project src/ForgePDF.Cli -- html report.html report.pdf

DOCX

dotnet run --project src/ForgePDF.Cli -- docx resume.docx resume.pdf

XLSX

dotnet run --project src/ForgePDF.Cli -- xlsx orders.xlsx orders.pdf

PPTX

dotnet run --project src/ForgePDF.Cli -- pptx slides.pptx slides.pdf

Concurrency Configuration

builder.Services.AddForgePdf(options =>
{
    options.MaxConcurrentDocuments = Environment.ProcessorCount;
    options.QueueTimeout = TimeSpan.FromSeconds(20);
});

Large File Rendering

.UseHybridMode()
.EnableStreaming()
.EnableParallelLayout()
.WithMaxDegreeOfParallelism(Environment.ProcessorCount)
.WithPageChunkSize(50)

Testing

dotnet test

Current Capabilities

Feature Status
HTML to PDF Supported
DOCX to PDF Supported
XLSX to PDF Supported
PPTX to PDF Supported
RTL Languages Supported
Parallel Rendering Supported
Streaming Supported
Headers/Footers Supported
Repeat Headers Supported
Repeat Footers Supported
Auto-fit Tables Supported

Future Roadmap

  • Chromium rendering engine
  • Full CSS layout engine
  • Native chart rendering
  • SVG rendering
  • Image rendering
  • SmartArt rendering
  • TrueType/OpenType font embedding
  • Advanced Unicode shaping
  • Pixel-perfect Office rendering
  • GPU acceleration
  • AI layout optimization

Performance Goals

ForgePDF AI is designed to compete with enterprise-grade PDF engines through:

  • High throughput rendering
  • Low memory allocations
  • Multi-threaded processing
  • Efficient page chunking
  • Large document optimization
  • Async streaming pipelines

Contributing

Contributions are welcome.

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Open a Pull Request

License

MIT License


Author

Raheel Ahmed

Solution Architect | Principal Software Architect

ForgePDF AI - Enterprise Document Conversion Engine

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  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 is compatible.  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.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ForgePDF.HtmlRenderer:

Package Downloads
ForgePDF.Converters

Document conversion extensions for the ForgePDF ecosystem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 191 5/16/2026
1.0.1 153 5/13/2026
1.0.0 120 5/13/2026