Skip to content

Length unit types

Following the PDF specification, QuestPDF uses points as its default measurement unit. Most Fluent API methods accept an optional unit parameter for specifying alternative measurement units.

Available units

UnitSize
Unit.Point1/72 inch
Unit.Meter100 centimeters
Unit.Inch2.54 centimeters
Unit.Centimeter10 millimeters
Unit.Feet12 inches
Unit.Mil1/1000 inch
Unit.Inch72 points

Example

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

c#
using QuestPDF.Infrastructure;

.Padding(72)
.Padding(1, Unit.Inch)
.Padding(1/12f, Unit.Feet)
.Padding(1000, Unit.Mill)

Released under the MIT License