Skip to content

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)

License

Notifications You must be signed in to change notification settings

cyanfish/naps2-pdfsharp

 
 

Repository files navigation

PdfSharpCore

NuGet Version CI codecov.io

PdfSharpCore is a partial port of PdfSharp.Xamarin for .NET Standard. Additionally MigraDoc has been ported as well (from version 1.32). Image support has been implemented with SixLabors.ImageSharp and Fonts support with SixLabors.Fonts.

Table of Contents

Example

static void Main(string[] args)
{
    var document = new PdfDocument();
    var page = document.AddPage();
    var gfx = XGraphics.FromPdfPage(page);
    var font = new XFont("OpenSans", 20, XFontStyle.Bold);
            
    gfx.DrawString(
        "Hello World!", font, XBrushes.Black,
        new XRect(20, 20, page.Width, page.Height),
        XStringFormats.Center);

    document.Save("test.pdf");
}

Contributing

We appreciate feedback and contribution to this repo!

License

This software is released under the MIT License. See the LICENSE file for more info.

About

Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 93.6%
  • Smalltalk 6.4%