PDFKit.NET 5.0 .NET Standard API

The .NET Standard is a formal specification of .NET APIs that are intended to be available on all .NET implementations. The motivation behind the .NET Standard is establishing greater uniformity in the .NET ecosystem. The .NET standard applications can be run not only on the usual platforms, but on iOS, Android, UWP and Linux as well.

The API of PDFKit.NET 5.0 .NET Standard edition is slightly different from the .NET 4 edition. The reason behind it is that .NET Standard does not include GDI+, WPF or any graphics APIs, so classes related to image handling and 2D coordinates must have been relpaced by our own classes. This inflicts a very small amount of changes on our API:

  • The BottomLeft, BottomRight, TopLeft, TopRight properties of the TallComponents.PDF.TextExtraction.Glyph class return coordinates of type TallComponents.Core.PointF in PDFKit 5 .NET Standard.
  • The TallComponents.PDF.Shapes.ImageShape and TallComponents.PDF.Forms.Fields.ImageField accept and return images of type TallComponents.Images.Core.CoreBitmap in PDFKit 5 .NET Standard.
  • TallComponents.Images.Core.CoreBitmap can be created by passing a System.IO.Stream or a path pointing to an image file. As for now, it can load JPEG, GIF, PNG, TIFF and JBIG2 image formats. It can save bitmaps as compressed PNGs only.
  • There are no extension methods converting GDI+ or WPF color classes to TallComponents.PDF.Colors.Color in PDFKit 5 .NET Standard. Colors can be conviniently created by RGB color components using an TallComponents.PDF.Colors.RGBColor ctor, or by color names using TallComponents.PDF.Colors.RGBColor.Parse(string color).
  • Instead of System.Drawing.Drawing2D.Matrix, one can use TallComponents.PDF.Transforms.MatrixTransform with similar features.