• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class PdfToWordCoordinateMapper

Deterministically maps PDF user-space coordinates to top-left-origin Word page coordinates. Crop-box origins and all PDF rotations are handled explicitly.

Inheritance
object
PdfToWordCoordinateMapper
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: DRIT.Document.Import.Pdf
Assembly: DRIT.Document.dll
Syntax
public sealed class PdfToWordCoordinateMapper

Constructors

PdfToWordCoordinateMapper(PdfRect, int)

Initializes a new PdfToWordCoordinateMapper from normalized PDF extraction data.

Declaration
public PdfToWordCoordinateMapper(PdfRect cropBox, int rotation)
Parameters
Type Name Description
PdfRect cropBox
int rotation

Properties

CropBox

Gets the normalized PDF crop box used for coordinate mapping.

Declaration
public PdfRect CropBox { get; }
Property Value
Type Description
PdfRect

Height

Gets the height of the represented page or bounds in points.

Declaration
public double Height { get; }
Property Value
Type Description
double

Rotation

Gets the normalized clockwise page rotation in degrees.

Declaration
public int Rotation { get; }
Property Value
Type Description
int

Width

Gets the width of the represented page or bounds in points.

Declaration
public double Width { get; }
Property Value
Type Description
double

Methods

MapBounds(PdfRect)

Maps and normalizes the axis-aligned bounds of a PDF object.

Declaration
public PdfLayoutRect MapBounds(PdfRect bounds)
Parameters
Type Name Description
PdfRect bounds
Returns
Type Description
PdfLayoutRect

MapPoint(PdfPoint)

Maps a PDF point, in user-space units, into top-left-origin page coordinates.

Declaration
public PdfLayoutPoint MapPoint(PdfPoint point)
Parameters
Type Name Description
PdfPoint point
Returns
Type Description
PdfLayoutPoint

NormalizeRotation(int)

Validates and normalizes a PDF rotation to a supported right-angle value.

Declaration
public static int NormalizeRotation(int rotation)
Parameters
Type Name Description
int rotation
Returns
Type Description
int

NormalizeSourceRect(PdfRect)

Normalizes a PDF rectangle so its edges are ordered consistently.

Declaration
public static PdfRect NormalizeSourceRect(PdfRect value)
Parameters
Type Name Description
PdfRect value
Returns
Type Description
PdfRect
Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX