Search Results for

    Show / Hide Table of Contents

    READ ME Version 6.5

    What’s new

    See History for information about all changes.

    Prerequisites

    What you need to use PDFsharp 6.5.0.

    • .NET 8, .NET 9, .NET 10, .NET Standard 2.0, and .NET 4.6.2 NuGet packages
      For your .NET (former .NET Core) projects we provide NuGet packages for .NET 8 or higher. For WinForms (GDI+) or WPF projects under .NET we provide packages for .NET 8 for Windows.
      For your .NET Framework projects we provide packages for .NET Standard 2.0. For WinForms (GDI+) or WPF projects, we provide packages for .NET Framework 4.6.2.

    • Latest SDK for building PDFsharp solutions
      Use the latest version of the SDK (.NET 10.0.100) to build the PDFsharp solution. This is because we use C# features from versions higher than C# 7.

    Breaking changes

    AGPL or Commercial License
    Beginning with version 6.5.0, your code must select the type of license to be used.

    Load the AGPL license

    To load the free AGPL license, insert the following code:

    PdfSharpLicense.SetAgplLicense();
    

    Load a commercial license

    If you need a commercial license, contact us at https://pdfsharp.com/Pricing.
    You will get your license key, which you can load as follows:

    PdfSharpLicense.LoadLicense(YourLicenseCode);
    

    Assets are removed from repositories

    PDFsharp uses a lot of assets like files for images, fonts, or PDFs. Starting with PDFsharp 6 these assets are not part of the repositories anymore. Instead, they are available for download from https://assets.pdfsharp.com. Before you can compile or run projects of a solution go to the dev folder in the solution root and run download-assets.ps1 once. This script downloads the assets required by the solution from the web into the assets folder.

    Compile PDFsharp solutions

    When you clone a repository like PDFsharp or PDFsharp.Samples from GitHub and download the assets once, it should compile immediately with Visual Studio or dotnet build.

    Because we use GitVersion to create the semantic version number from a git tag and the current branch name, there may be issues.

    • The build may fail because GitVersion does not find a valid commit to calculate the version number. See Note on using the ZIP file from GitHub.

    There may be other reasons why the build fails.

    • A C# file may contain non-ASCII characters and have neither BOM nor UTF-8 encoding. This can happen because our German Windows machines may encode such a file with Western European Codepage 1252 and such a file cannot be opened correctly on e.g. a Chinese Windows machine. Maybe this issue is already fixed in Visual Studio.

    Let us know when a solution does not compile immediately.

    Running tests

    Run examples under Linux

    The PDFsharp solution builds completely under Linux. But obviously only the PDFsharp core examples can be executed. We test it using WSL2 with Ubuntu 20.04 LTS.

    • Edit this page
    In this article
    Generated by DocFX  |   Privacy policy  |   Legal notice
    Back to top