GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ststeiger/PdfSharpCore: Port of the PdfSharp library to .NET Core - largely removed GDI+ (only missing GetFontData - which can be replaced with freetype2)

BranchesTags
Open more actions menu

Latest commit

 

History

376 Commits
376 Commits

Folders and files

NameName
Last commit message
Last commit date
.ci
.ci
 
 
.github/workflows
.github/workflows
 
 
MigraDocCore.DocumentObjectModel
MigraDocCore.DocumentObjectModel
 
 
MigraDocCore.Rendering
MigraDocCore.Rendering
 
 
PdfSharpCore.Charting
PdfSharpCore.Charting
 
 
PdfSharpCore.Test
PdfSharpCore.Test
 
 
PdfSharpCore
PdfSharpCore
 
 
SampleApp
SampleApp
 
 
docs
docs
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
PdfSharpCore.sln
PdfSharpCore.sln
 
 
README.md
README.md
 
 
ci-build.ps1
ci-build.ps1
 
 

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

  • Documentation
  • Example
  • Contributing
  • License

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 PdfSharpCore.Drawing;
using PdfSharpCore.Fonts;
using PdfSharpCore.Pdf;
using 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.

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 PdfSharpCore relies upon, are licensed under Apache 2.0 when distributed as part of PdfSharpCore. The SixLabors.ImageSharp license covers all other usage, see https://github.com/SixLabors/ImageSharp/blob/master/LICENSE

About

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

Topics

alphacsharpimagesharpnetcore2netstandard20pdfpdfsharpxamarin

Resources

Readme
License
Activity

Stars

1.2k stars

Watchers

35 watching

Forks

260 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.