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.
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");
}
We appreciate feedback and contribution to this repo!
This software is released under the MIT License. See the LICENSE file for more info.