Skip to content

# PDFNumberFormat

Namespace: O2S.Components.PDF4NET.Spatial

Defines how a measure units should be formatted for display.

    public class PDFNumberFormat

Inheritance Object → PDFNumberFormat

## Constructors

### PDFNumberFormat()

Initializes a new PDFNumberFormat object.

    public PDFNumberFormat()

## Properties

### ConversionFactor

Gets or sets the conversion factor.

    public double ConversionFactor { get; set; }

Property Value

Double
The conversion factor used to multiply a value in partial units of the previous number format array element to obtain a value in the units of this object.

Remarks

When this object is in the first number format in the array, its meaning (that is, what it shall be multiplied by) depends on which property in the PDFRectilinearMeasure references the number format array.

### DecimalSeparator

Gets or sets the decimal separator.

    public string DecimalSeparator { get; set; }

Property Value

String
Text that shall be used as the decimal position in displaying numerical values.

Remarks

An empty string indicates that the default shall be used.
Default value is PERIOD (0x2E).

### Denominator

Gets or sets the denominator.

    public int Denominator { get; set; }

Property Value

Int32
The denominator of a fractional display when PDFNumberFormat.FractionDisplay property is set to PDFFractionDisplay.Fraction.

Remarks

This property has meaning only if this object is the last one in a number format collection.

### DisplayMeasureUnitAsPrefix

Gets or sets a value indicating whether the PDFNumberFormat.MeasureUnit is displayed before or after the calculated unit value.

    public bool DisplayMeasureUnitAsPrefix { get; set; }

Property Value

Boolean
If true the PDFNumberFormat.MeasureUnit is a prefix to the value, otherwise it is a suffix to the value.
Default is false.
The characters specified by PDFNumberFormat.Prefix and PDFNumberFormat.Suffix shall be concatenated before considering this property.

### FractionDisplay

Gets or sets the fraction display.

    public PDFFractionDisplay FractionDisplay { get; set; }

Property Value

PDFFractionDisplay
A value indicating whether and in what manner to display a fractional value from the result of converting to the units of this object by means of the PDFNumberFormat.ConversionFactor property.

Remarks

This property has meaning only if this object is the last one in a number format collection.

### MeasureUnit

Gets or sets the measure unit.

    public string MeasureUnit { get; set; }

Property Value

String
A text string specifying a label for displaying the units represented by this object in a user interface; the label should use a universally recognized abbreviation.

### Precision

Gets or sets the precision.

    public int Precision { get; set; }

Property Value

Int32
The precision of decimal display when PDFNumberFormat.FractionDisplay property is set to PDFFractionDisplay.Decimal.

Remarks

The value must be a power of 10 (10, 100, 1000, 10000, etc).
This property has meaning only if this object is the last one in a number format collection.

### Prefix

Gets or sets the prefix.

    public string Prefix { get; set; }

Property Value

String
Text that shall be concatenated to the left of the label specified by PDFNumberFormat.MeasureUnit property.

Remarks

An empty string indicates that no text shall be added.
Default value is a single ASCII SPACE character (0x20).

### ReduceFraction

Gets or sets a value indicating whether the fractional part can be reduced or the low-order zeros truncated.

    public bool ReduceFraction { get; set; }

Property Value

Boolean
If true then a fractional value formatted according to the PDFNumberFormat.Precision or PDFNumberFormat.Denominator properties may not have its denominator reduced or low-order zeros truncated.

### Suffix

Gets or sets the suffix.

    public string Suffix { get; set; }

Property Value

String
Text that shall be concatenated after the label specified by PDFNumberFormat.MeasureUnit property.

Remarks

An empty string indicates that no text shall be added.
Default value is a single ASCII SPACE character (0x20).

### ThousandsSeparator

Gets or sets the thousands separator.

    public string ThousandsSeparator { get; set; }

Property Value

String
Text that shall be used between orders of thousands in display of numerical values.

Remarks

An empty string indicates that no text shall be added.
Default value is COMMA (0x2C).