Search Results for

    Show / Hide Table of Contents

    PDFsharp specifications

    Version 6.1.0

    In this article

    • Capabilities by build flavor
    • Supported .NET versions
    • Notes when upgrading from PDFsharp 1.x to PDFsharp 6

    This article describes technical specifications of PDFsharp Library 6.

    Capabilities by build flavor

    PDFsharp Core build

    The Core build can run on various platforms, including Windows, Linux, MacOS, and others. The default PlatformFontResolver will find some fonts under Windows and WSL and also under some Linux distributions, but to make a portable application, implement IFontResolver in your own FontResolver class that returns all the fonts needed by your application. See Fonts for details.

    The Core build supports a few image formats like JPEG, PNG, and Windows BMP. See this topic for details:
    Bitmap Images

    Other images should be converted to Windows BMP or PNG for use with the Core build.

    Please note that images in the PDF file will always be compressed, so converting to BMP instead of PNG will not generally lead to larger PDF files. So if, for example, your image is a 16 color raster image, then converting to BMP with 16 color may lead to a smaller PDF file than converting to a PNG file with 256 colors.

    PDFsharp GDI+ build & PDFsharp WPF build

    These builds continue to rely on Windows components, either GDI+ or WPF, to import images. See this topic for details:
    Bitmap Images

    Normally those builds can use all fonts from the Windows Fonts folder, but in some server scenarios access to this folder is restricted. To use fonts that are not installed in the Windows Fonts folder or to make your app work when access to this folder is restricted, implement IFontResolver in your own FontResolver class that returns all the fonts needed by your application. See Fonts for details.

    Supported .NET versions

    PDFsharp 6.0 compiles against .NET 6 and should also work with higher .NET versions.

    PDFsharp 6.1 additionally compiles against .NET Standard 2.0 or .NET 4.7.2 respectively, and should also work with higher .NET Framework versions.

    Notes when upgrading from PDFsharp 1.x to PDFsharp 6

    Note for users of PDFsharp & MigraDoc version 1.5: With version 1.5 the packages PDFsharp and PDFsharp-MigraDoc still depended on GDI+ to import images and resolve fonts. To get the same functionality with version 6.0, use either one of the -GDI oder one of the -WPF packages.

    Upgrading an existing MigraDoc project is described in Upgrade existing projects to PDFsharp 6.

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