Namespace PSPDFKit.Projection
Classes
Projection
Projection between the normalized PDF coordinates and raw PDF coordinates. To retrieve an instance of this, use GetProjection(). For more information on coordinate spaces and coordinate conversions, please refer to our Coordinate Space Conversion online guide.
When working with coordinates on a PDF, PSPDFKit .NET Library will use a normalized coordinate space for
simplified handling. This normalized coordinate space follows the WYSWIG principle ("What you see is what you
get"). Within the normalized coordinate space, the coordinate [0,0]
denotes the bottom left corner of the
displayed page, and [page width, page height]
denotes the top right corner of the displayed page. Note that
PSPDFKit already accounts for any rotation that might be applied to the page, as well as page cropping using the
page's CropBox
. This means that [0,0]
will always mark the bottom left corner of a page, independent of its
rotation or cropping.
While normalized coordinates greatly simplify coordinate handling for most scenarios, some use cases might require access to raw PDF coordinates. For those cases, this projection can be used to convert between PDF coordinates used by PSPDFKit, and the raw PDF coordinates that will be written into the underlying PDF document.