PdfSharpCore
PdfSharpCore copied to clipboard
Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)
PdfSharpCore
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
- Documentation
- Example
- Contributing
- License
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.