Top Description Fields Constructors Methods
org.apache.pdfbox.pdmodel.interactive.measurement

public Class PDNumberFormatDictionary

extends Object
implements COSObjectable
Class Inheritance
All Implemented Interfaces
org.apache.pdfbox.pdmodel.common.COSObjectable
Imports
org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.pdmodel.common.COSObjectable

This class represents a number format dictionary.

Field Summary

Modifier and TypeField and Description
public static final String
FRACTIONAL_DISPLAY_DECIMAL

Constant for showing a fractional value as decimal to the precision specified by the D entry.

public static final String
FRACTIONAL_DISPLAY_FRACTION

Constant for showing a fractional value as a fraction with denominator specified by the D entry.

public static final String
FRACTIONAL_DISPLAY_ROUND

Constant for showing a fractional value without fractional part; round to the nearest whole unit.

public static final String
FRACTIONAL_DISPLAY_TRUNCATE

Constant for showing a fractional value without fractional part; truncate to achieve whole units.

public static final String
LABEL_PREFIX_TO_VALUE

Constant indicating that the label specified by U is a postfix to the value.

public static final String
LABEL_SUFFIX_TO_VALUE

Constant indicating that the label specified by U is a suffix to the value.

private final COSDictionary
public static final String
TYPE

The type of the dictionary.

Constructor Summary

AccessConstructor and Description
public
public
PDNumberFormatDictionary(COSDictionary
the corresponding dictionary
dictionary
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

the conversion factor
getConversionFactor
()

This will return the conversion factor.

public COSDictionary

Returns:

the number format dictionary
getCOSObject
()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

This will return the dictionary.

public String

Returns:

decimal separator
getDecimalSeparator
()

This will return the text to be used as the decimal point in displaying numerical values.

public int

Returns:

the precision or denominator
getDenominator
()

This will return the precision or denominator of a fractional amount.

public String

Returns:

the manner to display a fractional value
getFractionalDisplay
()

This will return the value for the manner to display a fractional value.

public String

Returns:

label position
getLabelPositionToValue
()

This will return a value indicating the ordering of the label specified by U to the calculated unit value.

public String

Returns:

label prefix
getLabelPrefixString
()

This will return the text to be concatenated to the left of the label specified by U.

public String

Returns:

label suffix
getLabelSuffixString
()

This will return the text to be concatenated after the label specified by U.

public String

Returns:

thousands separator
getThousandsSeparator
()

This will return the text to be used between orders of thousands in display of numerical values.

public String

Returns:

the type
getType
()

This will return the type of the number format dictionary.

public String

Returns:

the label for the units
getUnits
()

This will return the label for the units.

public boolean

Returns:

fd
isFD
()

This will return the value indication if the denominator of the fractional value is reduced/truncated .

public void
setConversionFactor(float
the conversion factor
conversionFactor
)

This will set the conversion factor.

public void
setDecimalSeparator(String
decimal separator
decimalSeparator
)

This will set the text to be used as the decimal point in displaying numerical values.

public void
setDenominator(int
the precision or denominator
denominator
)

This will set the precision or denominator of a fractional amount.

public void
setFD(boolean
fd
fd
)

This will set the value indication if the denominator of the fractional value is reduced/truncated .

public void
setFractionalDisplay(String
the manner to display a fractional value
fractionalDisplay
)

This will set the value for the manner to display a fractional value.

public void
setLabelPositionToValue(String
label position
labelPositionToValue
)

This will set the value indicating the ordering of the label specified by U to the calculated unit value.

public void
setLabelPrefixString(String
label prefix
labelPrefixString
)

This will set the text to be concatenated to the left of the label specified by U.

public void
setLabelSuffixString(String
label suffix
labelSuffixString
)

This will set the text to be concatenated after the label specified by U.

public void
setThousandsSeparator(String
thousands separator
thousandsSeparator
)

This will set the text to be used between orders of thousands in display of numerical values.

public void
setUnits(String
the label for the units
units
)

This will set the label for the units.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FRACTIONAL_DISPLAY_DECIMALback to summary
public static final String FRACTIONAL_DISPLAY_DECIMAL

Constant for showing a fractional value as decimal to the precision specified by the D entry.

FRACTIONAL_DISPLAY_FRACTIONback to summary
public static final String FRACTIONAL_DISPLAY_FRACTION

Constant for showing a fractional value as a fraction with denominator specified by the D entry.

FRACTIONAL_DISPLAY_ROUNDback to summary
public static final String FRACTIONAL_DISPLAY_ROUND

Constant for showing a fractional value without fractional part; round to the nearest whole unit.

FRACTIONAL_DISPLAY_TRUNCATEback to summary
public static final String FRACTIONAL_DISPLAY_TRUNCATE

Constant for showing a fractional value without fractional part; truncate to achieve whole units.

LABEL_PREFIX_TO_VALUEback to summary
public static final String LABEL_PREFIX_TO_VALUE

Constant indicating that the label specified by U is a postfix to the value.

LABEL_SUFFIX_TO_VALUEback to summary
public static final String LABEL_SUFFIX_TO_VALUE

Constant indicating that the label specified by U is a suffix to the value.

numberFormatDictionaryback to summary
private final COSDictionary numberFormatDictionary
TYPEback to summary
public static final String TYPE

The type of the dictionary.

Constructor Detail

PDNumberFormatDictionaryback to summary
public PDNumberFormatDictionary()

Constructor.

PDNumberFormatDictionaryback to summary
public PDNumberFormatDictionary(COSDictionary dictionary)

Constructor.

Parameters
dictionary:COSDictionary

the corresponding dictionary

Method Detail

getConversionFactorback to summary
public float getConversionFactor()

This will return the conversion factor.

Returns:float

the conversion factor

getCOSObjectback to summary
public COSDictionary getCOSObject()

Implements org.apache.pdfbox.pdmodel.common.COSObjectable.getCOSObject.

This will return the dictionary.

Returns:COSDictionary

the number format dictionary

Annotations
@Override
getDecimalSeparatorback to summary
public String getDecimalSeparator()

This will return the text to be used as the decimal point in displaying numerical values.

Returns:String

decimal separator

getDenominatorback to summary
public int getDenominator()

This will return the precision or denominator of a fractional amount.

Returns:int

the precision or denominator

getFractionalDisplayback to summary
public String getFractionalDisplay()

This will return the value for the manner to display a fractional value.

Returns:String

the manner to display a fractional value

getLabelPositionToValueback to summary
public String getLabelPositionToValue()

This will return a value indicating the ordering of the label specified by U to the calculated unit value.

Returns:String

label position

getLabelPrefixStringback to summary
public String getLabelPrefixString()

This will return the text to be concatenated to the left of the label specified by U.

Returns:String

label prefix

getLabelSuffixStringback to summary
public String getLabelSuffixString()

This will return the text to be concatenated after the label specified by U.

Returns:String

label suffix

getThousandsSeparatorback to summary
public String getThousandsSeparator()

This will return the text to be used between orders of thousands in display of numerical values.

Returns:String

thousands separator

getTypeback to summary
public String getType()

This will return the type of the number format dictionary. It must be "NumberFormat"

Returns:String

the type

getUnitsback to summary
public String getUnits()

This will return the label for the units.

Returns:String

the label for the units

isFDback to summary
public boolean isFD()

This will return the value indication if the denominator of the fractional value is reduced/truncated .

Returns:boolean

fd

setConversionFactorback to summary
public void setConversionFactor(float conversionFactor)

This will set the conversion factor.

Parameters
conversionFactor:float

the conversion factor

setDecimalSeparatorback to summary
public void setDecimalSeparator(String decimalSeparator)

This will set the text to be used as the decimal point in displaying numerical values.

Parameters
decimalSeparator:String

decimal separator

setDenominatorback to summary
public void setDenominator(int denominator)

This will set the precision or denominator of a fractional amount.

Parameters
denominator:int

the precision or denominator

setFDback to summary
public void setFD(boolean fd)

This will set the value indication if the denominator of the fractional value is reduced/truncated . The denominator may not be reduced/truncated if true

Parameters
fd:boolean

fd

setFractionalDisplayback to summary
public void setFractionalDisplay(String fractionalDisplay)

This will set the value for the manner to display a fractional value. Allowed values are "D", "F", "R", "T" and null.

Parameters
fractionalDisplay:String

the manner to display a fractional value

setLabelPositionToValueback to summary
public void setLabelPositionToValue(String labelPositionToValue)

This will set the value indicating the ordering of the label specified by U to the calculated unit value. Possible values are "S", "P" and null.

Parameters
labelPositionToValue:String

label position

setLabelPrefixStringback to summary
public void setLabelPrefixString(String labelPrefixString)

This will set the text to be concatenated to the left of the label specified by U.

Parameters
labelPrefixString:String

label prefix

setLabelSuffixStringback to summary
public void setLabelSuffixString(String labelSuffixString)

This will set the text to be concatenated after the label specified by U.

Parameters
labelSuffixString:String

label suffix

setThousandsSeparatorback to summary
public void setThousandsSeparator(String thousandsSeparator)

This will set the text to be used between orders of thousands in display of numerical values.

Parameters
thousandsSeparator:String

thousands separator

setUnitsback to summary
public void setUnits(String units)

This will set the label for the units.

Parameters
units:String

the label for the units