PeachPDF.PdfSharpCore 0.7.4

PeachPDF.PdfSharpCore

NuGet Version CI codecov.io

PeachPDF.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

The following code snippet creates a simple PDF-file with the text 'Hello World!'. The code is written for a .NET 6 console app with top level statements.

using PeachPDF.PdfSharpCore.Drawing;
using PeachPDF.PdfSharpCore.Fonts;
using PeachPDF.PdfSharpCore.Pdf;
using PeachPDF.PdfSharpCore.Utils;

GlobalFontSettings.FontResolver = new FontResolver();

var document = new PdfDocument();
var page = document.AddPage();

var gfx = XGraphics.FromPdfPage(page);
var font = new XFont("Arial", 20, XFontStyle.Bold);

var textColor = XBrushes.Black;
var layout = new XRect(20, 20, page.Width, page.Height);
var format = XStringFormats.Center;

gfx.DrawString("Hello World!", font, textColor, layout, format);

document.Save("helloworld.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.

PeachPDF.PdfSharpCore relies on the following projects, that are not under the MIT license:

  • SixLabors.ImageSharp and SixLabors.Fonts
    • SixLabors.ImageSharp and SixLabors.Fonts, libraries which PeachPDF.PdfSharpCore relies upon, are licensed under Apache 2.0 when distributed as part of PeachPDF.PdfSharpCore. The SixLabors.ImageSharp license covers all other usage, see https://github.com/SixLabors/ImageSharp/blob/master/LICENSE

No packages depend on PeachPDF.PdfSharpCore.

PeachPDF.PdfSharpCore is a partial port of PdfSharp.Xamarin for .NET Core Additionally MigraDoc has been ported as well (from version 1.32)

.NET 8.0

Version Downloads Last updated
0.7.23 1 08/03/2025
0.7.18 3 05/27/2025
0.7.15 2 06/14/2025
0.7.6 2 06/12/2025
0.7.4 2 06/12/2025
0.7.3 2 06/12/2025
0.7.1 2 06/12/2025
0.7.0 2 06/12/2025
0.6.3 3 06/12/2025
0.6.2 3 06/12/2025
0.6.1 2 06/12/2025
0.6.0 2 06/12/2025