What's New in Version 12?

If you want a quick overview you may be interested in the ABCpdf PDF Comparison Chart...

.NET 5.0

For this release ABCpdf has been extensively updated for the .NET 5.0 world.

The original MSI based installer is still recommended for development because it includes everything that you might ever want including documentation and example projects.

However the NuGet installers provide lightweight installation and update and are well integrated into Visual Studio for the development of both .NET 4.0 and 5.0.

Indeed you can use both at the same time for the best of both worlds.

ABCChrome

ABCpdf Version 12 now comes with an updated ABCChrome HTML rendering engine.

ABCChrome 86 is based around Chromium 86 and contains many fixes and features related to the elimination of vulnerabilities. It introduces Site Isolation for improved security, other changes designed to mitigate the risks associated with the Spectre exploit and new cross-origin policies to provide extra security. It also copes better with extremely large and processor intensive documents.

In addition there are many new CSS features available in the current release - @supports for feature detection, constructible style sheets, styled bullet points and markers for lists, conic gradients - amongst others. Full details can be found on the Chrome version history as detailed on Wikipedia.

However we also include ABCChrome 65 for legacy systems. Although this is quite old - it was released 2018 - there are a few reasons you may wish to continue to use it.

The security changes for ABCChrome 86 have resulted in a more secure engine, but one that can be less performant. So if ABCChrome is only exposed to pre-vetted content then you may not see the need to transition.

Similarly the current engine no longer supports TLS 1.0 and TLS 1.1 so if you are relying on one of these for a legacy system, then you may wish to stay with the older release.

Images

We have implemented and linked into a whole heap of new image functionality.

We additionally allow import of the following new file formats:

  • High Efficiency Image File Format (HEIF) - .heic, .heif, .avci, .heics, .heifs, .avcs, .avif, .avifs
  • WebP - .webp
  • Various Raw Formats - .3fr, .ari, .arw, .bay, .cap, .cr2, .cr3, .crw, .dcs, .dcr, .drf, .eip, .erf, .fff, .iiq, .k25, .kdc, .mef, .mos, .mrw, .nef, .nrw, .orf, .ori, .pef, .ptx, .pxn, .raf, .raw, .rw2, .rwl, .sr2, .srf, .srw, .x3f, .dng, .arw, .cr2, .crw, .erf, .kdc, .mrw, .nef, .nrw, .orf, .pef, .raf, .raw, .rw2, .rwl, .sr2, .srw, .dng
  • DirectDraw Surface - .dds
  • Windows Media Photo (JPEG XR - JPEG extended range) - .wdp, .jxr

And additionally, export of the following new file formats:

  • High Efficiency Image File Format (HEIF) - .heic, .heif
  • WebP - .webp
  • DirectDraw Surface - .dds
  • Windows Media Photo (JPEG XR - JPEG extended range) - .wdp, .jxr

Note that the precise implementation and set of capabilities may vary between machines.

Ghent

The Ghent Workgroup is an international organization made up of graphics professionals and developers creating best practices for publishing and packaging.

As part of their remit they have created the Ghent PDF Output Suite - a highly demanding PDF rendering suite which is designed to test the conformance of PDF rendering software.

Few PDF rendering engines are compliant. Indeed most of the mainstream PDF rendering engines are non-compliant.

ABCpdf is now fully compliant with the Ghent PDF Output Suite 5.0.

Annots

There are a whole host of new form field and annotations classes for simple creation of different types of markup.

In total there are twenty-one new annotation types covering everything from lines to rubber stamps through to 3D content.

  • ButtonAnnotation
  • CheckBoxAnnotation
  • ChoiceFieldAnnotation
  • CircleAnnotation
  • D3DAnnotation
  • FileAttachmentAnnotation
  • FreeTextAnnotation
  • InkAnnotation
  • LineAnnotation
  • LinkAnnotation
  • PolygonAnnotation
  • PolylineAnnotation
  • PopupAnnotation
  • RadioButtonAnnotation
  • RichMediaAnnotation
  • ScreenAnnotation
  • SquareAnnotation
  • StampAnnotation
  • TextAnnotation
  • TextMarkupAnnotation
  • WidgetAnnotation

Signatures

Digital signature functionality has been greatly improved. A good part of the improvement is internal - it just works.

However on the more visible side you will see new structures such as ValidationInfo, which allows you more detailed examination of the extent to which a signature can be classed as valid.

This release includes methods to lock a document after signing and to make a signature into a document wide certification signature. Then there are new methods for adding and signing timestamp signatures and for adding Long Term Validation (LTV) information.

Streams

Our classes are great for high level operations but sometimes you need a really fine level of control over the processing of a PDF document.

For example suppose you need to scan through a page looking for a filled rectangle in a particular spot color. This is the kind of thing which has been possible in the past but is terribly tricky to get right because the process of keeping track of the items that exist and of the current graphics state is complex and easy to get wrong.

For this release we have tackled this issue with a set of new operation classes. There is the ContentStreamScanner which allows you to scan through a content stream in an efficient way, looking for particular operations.

This co-exists with the GraphicsState and TextState classes which keep track of current state. Both of these can be used in conjunction with the ContentStreamOperation which allows you to find the content streams you want to process.

Finally there's the Resorcerer class which allows fast and easy access to resources referenced in your content streams. All these classes have been designed to be fast and efficient with minimal overhead for any features you do not need to use.

Atoms

The Atom class allows low level access to the PDF structures. It is a terribly flexible way to access items but sometimes you want something a little higher level.

For Version 12 we have released the Converter class. This provides simple access to Atoms and groups of Atoms while resolving any references which are required.

As well as being what you generally need, it also allows a level of optimization as multiple operations can be batched up and processed as one.

The Converter class is easily available via the ObjectSoup.Convert property.

Precision

Historically ABCpdf has used five decimal digits of precision for floating point numbers.

The reasons for this are rooted in the PDF 1.4 specification which was superseded in 2003.

For this release we now allow the use of high precision floating point values for a more current output style.

This precision is controllable via the PDFLimits.FloatDigits class. The documentation for this includes a discussion as to the pros and cons of changing precision.

PDF 2.0

The PDF 2.0 specification - ISO 32000-2:2020 was released late 2020.

ABCpdf is fully supported and compatible with this new release of the PDF specification.

Examples

The changes in ABCpdf have allowed significant simplification of a number of example projects.

Most notably the Annotations project is much more self contained as much of the required form functionality is now contained in the Form object.

The ContentStreamScanner and related classes have also enabled a large amount of code to be removed from the GetColors and Redaction examples.

Other

And as usual there's a whole host of useful new functions and properties like:

  • HtmlOptions.BaseURI - for specifying the location of resources when using AddImageHtml.
  • Annotation appearance functions for getting and setting appearance streams.
  • Annotation.Color - for specifying the color of annotations.
  • NameAtom.Encode - for name encoding strings for insertion into content streams.
  • StringAtom.Data - for getting strings as raw data for insertion into content streams.
  • FontObject properties and functions for accessing horizontal and vertical font metrics.
  • Rendering.Backdrop - for specifying the page background color.
  • VirtualPageOperation - for constructing Form XObjects and annotation appearance streams.

 

What's New in Other Versions