Skip to content

Migration 0.0.X to 0.1.0

Eliot Jones edited this page Jan 13, 2020 · 7 revisions

There have been some substantial changes between versions 0.0.1+ to 0.1.0.

Doubles

Types exposing information on the public API such as PdfRectangle, PdfPoint and other numeric types previously using decimal have now changed to use doubles. This provides performance improvements.

Consumers will need to update their code to use doubles where previously using decimals.

New Projects and Namespaces

In version 0.1.0 in order to support maintainability and code quality moving forward, code has been split out into new projects.

image

The new projects are:

  • UglyToad.PdfPig.Core - For types used by all projects.
  • UglyToad.PdfPig.Tokens - The core tokens used by all PostScript data (PDF, Adobe Type 1).
  • UglyToad.PdfPig.Tokenization - The code used to read tokens from input.
  • UglyToad.PdfPig.Fonts - Font formats such as TrueType, Standard14 Adobe Font Metrics (AFM), Compact Font Format (CFF) etc, which are external to the PDF specification.
  • UglyToad.PdfPig - The main project containing all PDF specification related implementation and helper classes.
  • UglyToad.PdfPig.DocumentLayoutAnalysis - Tools built on top of the main project to provide structure/layout analysis and export support for PDF documents.

The most important changes for consumers who will need to change imports are:

  • PdfPoint, PdfRectangle, PdfPath and PdfLine move from UglyToad.PdfPig.Geometry to UglyToad.PdfPig.Core.
  • PdfDocumentFormatException moves from UglyToad.PdfPig.Exceptions to UglyToad.PdfPig.Core.
  • UglyToad.PdfPig.Export classes move to a new project and namespace UglyToad.PdfPig.DocumentLayoutAnalysis.Export.
  • TextBlock and TextLine move to UglyToad.PdfPig.DocumentLayoutAnalysis.
  • IndirectReference moves to UglyToad.PdfPig.Core.
  • DocstrumBoundingBoxes, IPageSegmenter, RecursiveXYCut and DefaultPageSegmenter move to UglyToad.PdfPig.DocumentLayoutAnalysis.PageSegmenter.
  • NearestNeighbourWordExtractor moves to UglyToad.PdfPig.DocumentLayoutAnalysis.WordExtractor.
Clone this wiki locally