Concepts

Units

Length units of measure.

FluentWriter uses points as the default unit of measure of font size and inches for all other spatial properties. Most Fluent API methods accept an optional unit parameter for specifying alternative measurement units.

Available Units

UnitDescription
Unit.TwipTwentieths of an Imperial Point (twip)
Unit.EMUEnglish Metric Unit (EMU)
Unit.PointPoint (1/72 inch)
Unit.MillimeterMillimeter
Unit.CentimeterCentimeter
Unit.MeterMeter
Unit.InchInch
Unit.FeetFeet

Example

Unit types can be optionally specified in most of length-related API methods. As an example, the following code snippets are equivalent:

using FluentWriter.Word.Infrastructure

paragraph.Margin(1)
paragraph.Margin(1/12f, Unit.Feet)
paragraph.Margin(72, Unit.Point)