AdfKit 1.0.1122

dotnet add package AdfKit --version 1.0.1122
                    
NuGet\Install-Package AdfKit -Version 1.0.1122
                    
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="AdfKit" Version="1.0.1122" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AdfKit" Version="1.0.1122" />
                    
Directory.Packages.props
<PackageReference Include="AdfKit" />
                    
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 AdfKit --version 1.0.1122
                    
#r "nuget: AdfKit, 1.0.1122"
                    
#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 AdfKit@1.0.1122
                    
#: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=AdfKit&version=1.0.1122
                    
Install as a Cake Addin
#tool nuget:?package=AdfKit&version=1.0.1122
                    
Install as a Cake Tool

AdfKit

NuGet Downloads License

AdfKit is a powerful .NET library for converting HTML to Atlassian Document Format (ADF). Perfect for integrating rich content into Confluence, Jira, and other Atlassian products with precise formatting preservation.

Features

  • High-Fidelity Conversion: Convert HTML to ADF with excellent formatting preservation
  • Multi-Target Support: Compatible with .NET 6, .NET 8, and .NET 9
  • Comprehensive HTML Support: Handles headings, paragraphs, lists, tables, links, images, and inline formatting
  • Production-Ready: Built for enterprise use with robust error handling and validation
  • Easy Integration: Simple API with both instance and static methods
  • Secure Licensing: Cryptographically signed license validation

Installation

Install AdfKit via NuGet Package Manager:

dotnet add package AdfKit

Or via Package Manager Console in Visual Studio:

Install-Package AdfKit

License Requirement

** Important: AdfKit requires a valid license key to operate without restrictions.**

Get Your License Key

Trial Limitations

The trial license includes:

  • Full functionality for evaluation
  • 14-day trial period
  • Up to 100 conversions
  • Not for production use

Quick Start

1. Set up your license

# Option 1: Environment variable (recommended)
export ADFKIT_LICENSE_FILE="/path/to/your/license.key"

# Option 2: License content directly
export ADFKIT_LICENSE_CONTENT="your-license-key-content"

2. Convert HTML to ADF

using AdfKit;
using AdfKit.Licensing;

try
{
    // Create converter (license loaded from environment)
    var converter = new HtmlToAdfConverter();
    
    // Convert HTML to ADF
    var html = """
        <h1>Welcome to AdfKit</h1>
        <p>This is a <strong>powerful</strong> HTML to ADF converter.</p>
        <ul>
            <li>Easy to use</li>
            <li>High performance</li>
            <li>Production ready</li>
        </ul>
        """;
    
    var adfDocument = converter.ConvertHtml(html);
    
    // Use the ADF document with Atlassian APIs
    Console.WriteLine($" Conversion successful! Licensed to: {converter.LicenseData.User}");
}
catch (LicenseValidationException ex)
{
    Console.WriteLine($" License error: {ex.Message}");
}

Usage Examples

Static Method (One-liner)

using AdfKit;

// Convert with license file path
var adfDoc = HtmlToAdfConverter.Convert(htmlContent, "./license.key");

Instance with License File

using AdfKit;

// Pass license file directly to constructor
var converter = new HtmlToAdfConverter("./license.key");
var adfDocument = converter.ConvertHtml(htmlContent);

// Access license information
var license = converter.LicenseData;
Console.WriteLine($"Licensed to: {license.User}");
Console.WriteLine($"Expires: {license.ExpiresAt.ToString("yyyy-MM-dd")  "Never"}");

ASP.NET Core Integration

// In Program.cs or Startup.cs
builder.Services.AddScoped<HtmlToAdfConverter>(provider =>
{
    var config = provider.GetRequiredService<IConfiguration>();
    var licensePath = config["AdfKit:LicensePath"];
    return new HtmlToAdfConverter(licensePath);
});

// In your controller or service
public class DocumentController : ControllerBase
{
    private readonly HtmlToAdfConverter _converter;
    
    public DocumentController(HtmlToAdfConverter converter)
    {
        _converter = converter;
    }
    
    [HttpPost("convert")]
    public IActionResult ConvertToAdf([FromBody] string html)
    {
        try
        {
            var adf = _converter.ConvertHtml(html);
            return Ok(adf);
        }
        catch (LicenseValidationException ex)
        {
            return BadRequest($"License error: {ex.Message}");
        }
    }
}

Supported HTML Elements

Element Support Notes
Headers <h1> through <h6>
Paragraphs <p> with inline formatting
Lists Ordered (<ol>) and unordered (<ul>)
Tables Basic tables with headers and cells
Links <a href=""> elements
Images <img> converted to media elements
Formatting Bold, italic, underline, strikethrough
Code Inline <code> and <pre> blocks
Blockquotes <blockquote> elements
Line Breaks <br> and <hr> elements

Configuration

License Setup Options

// 1. Environment variable (recommended for production)
Environment.SetEnvironmentVariable("ADFKIT_LICENSE_FILE", "./license.key");
var converter = new HtmlToAdfConverter();

// 2. Direct file path
var converter = new HtmlToAdfConverter("./license.key");

// 3. License content as environment variable
Environment.SetEnvironmentVariable("ADFKIT_LICENSE_CONTENT", licenseContent);
var converter = new HtmlToAdfConverter();

Error Handling

using AdfKit;
using AdfKit.Licensing;

try
{
    var converter = new HtmlToAdfConverter("./license.key");
    var result = converter.ConvertHtml(html);
}
catch (LicenseValidationException ex) when (ex.Message.Contains("expired"))
{
    // Handle expired license
    Console.WriteLine("License has expired. Please renew your license.");
}
catch (LicenseValidationException ex) when (ex.Message.Contains("not found"))
{
    // Handle missing license
    Console.WriteLine("License file not found. Please check the file path.");
}
catch (LicenseValidationException ex)
{
    // Handle other license issues
    Console.WriteLine($"License validation failed: {ex.Message}");
}

License Features

  • Perpetual License: Continue using the version you licensed forever
  • One Year Updates: Free updates and support for 12 months
  • No Runtime Royalties: No additional fees based on usage
  • Cryptographic Security: Tamper-proof license validation
  • ADF API: Cloud-based document conversion service

Support & Resources

What is ADF

Atlassian Document Format (ADF) is a JSON-based format used by Atlassian products like Confluence and Jira to represent rich content. It's the standard format for:

  • Creating Confluence pages programmatically
  • Adding rich content to Jira issues
  • Integrating with Atlassian's Editor

AdfKit makes it easy to convert your existing HTML content into ADF format with high fidelity.

Important Notes

  • License Required: A valid license key is required for production use
  • Trial Available: Free trial licenses available for evaluation
  • No Storage: AdfKit doesn't store or transmit your content
  • Offline Processing: All conversion happens locally on your machine
  • Thread Safe: Converter instances are thread-safe for concurrent use

Ready to get started Get your free trial license and start converting HTML to ADF in minutes!

AdfKit is developed by Vilalta Ventures LLC. All rights reserved.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 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 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.1122 92 10/17/2025