Class PDNumberFormatDictionary

java.lang.Object
org.apache.pdfbox.pdmodel.interactive.measurement.PDNumberFormatDictionary
All Implemented Interfaces:
COSObjectable

public class PDNumberFormatDictionary extends Object implements COSObjectable
This class represents a number format dictionary.
Version:
$Revision: 1.0$
  • Field Details

    • TYPE

      public static final String TYPE
      The type of the dictionary.
      See Also:
    • LABEL_SUFFIX_TO_VALUE

      public static final String LABEL_SUFFIX_TO_VALUE
      Constant indicating that the label specified by U is a suffix to the value.
      See Also:
    • LABEL_PREFIX_TO_VALUE

      public static final String LABEL_PREFIX_TO_VALUE
      Constant indicating that the label specified by U is a postfix to the value.
      See Also:
    • FRACTIONAL_DISPLAY_DECIMAL

      public static final String FRACTIONAL_DISPLAY_DECIMAL
      Constant for showing a fractional value as decimal to the precision specified by the D entry.
      See Also:
    • FRACTIONAL_DISPLAY_FRACTION

      public static final String FRACTIONAL_DISPLAY_FRACTION
      Constant for showing a fractional value as a fraction with denominator specified by the D entry.
      See Also:
    • FRACTIONAL_DISPLAY_ROUND

      public static final String FRACTIONAL_DISPLAY_ROUND
      Constant for showing a fractional value without fractional part; round to the nearest whole unit.
      See Also:
    • FRACTIONAL_DISPLAY_TRUNCATE

      public static final String FRACTIONAL_DISPLAY_TRUNCATE
      Constant for showing a fractional value without fractional part; truncate to achieve whole units.
      See Also:
  • Constructor Details

    • PDNumberFormatDictionary

      public PDNumberFormatDictionary()
      Constructor.
    • PDNumberFormatDictionary

      public PDNumberFormatDictionary(COSDictionary dictionary)
      Constructor.
      Parameters:
      dictionary - the corresponding dictionary
  • Method Details

    • getCOSObject

      public COSBase getCOSObject()
      Convert this standard java object to a COS object.
      Specified by:
      getCOSObject in interface COSObjectable
      Returns:
      The cos object that matches this Java object.
    • getDictionary

      public COSDictionary getDictionary()
      This will return the dictionary.
      Returns:
      the number format dictionary
    • getType

      public String getType()
      This will return the type of the number format dictionary. It must be "NumberFormat"
      Returns:
      the type
    • getUnits

      public String getUnits()
      This will return the label for the units.
      Returns:
      the label for the units
    • setUnits

      public void setUnits(String units)
      This will set the label for the units.
      Parameters:
      units - the label for the units
    • getConversionFactor

      public float getConversionFactor()
      This will return the conversion factor.
      Returns:
      the conversion factor
    • setConversionFactor

      public void setConversionFactor(float conversionFactor)
      This will set the conversion factor.
      Parameters:
      conversionFactor - the conversion factor
    • getFractionalDisplay

      public String getFractionalDisplay()
      This will return the value for the manner to display a fractional value.
      Returns:
      the manner to display a fractional value
    • setFractionalDisplay

      public void setFractionalDisplay(String fractionalDisplay)
      This will set the value for the manner to display a fractional value. Allowed values are "D", "F", "R" and "T"
      Parameters:
      fractionalDisplay - the manner to display a fractional value
    • getDenominator

      public int getDenominator()
      This will return the precision or denominator of a fractional amount.
      Returns:
      the precision or denominator
    • setDenominator

      public void setDenominator(int denominator)
      This will set the precision or denominator of a fractional amount.
      Parameters:
      denominator - the precision or denominator
    • isFD

      public boolean isFD()
      This will return the value indication if the denominator of the fractional value is reduced/truncated .
      Returns:
      fd
    • setFD

      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 - fd
    • getThousandsSeparator

      public String getThousandsSeparator()
      This will return the text to be used between orders of thousands in display of numerical values.
      Returns:
      thousands separator
    • setThousandsSeparator

      public void setThousandsSeparator(String thousandsSeparator)
      This will set the text to be used between orders of thousands in display of numerical values.
      Parameters:
      thousandsSeparator - thousands separator
    • getDecimalSeparator

      public String getDecimalSeparator()
      This will return the text to be used as the decimal point in displaying numerical values.
      Returns:
      decimal separator
    • setDecimalSeparator

      public void setDecimalSeparator(String decimalSeparator)
      This will set the text to be used as the decimal point in displaying numerical values.
      Parameters:
      decimalSeparator - decimal separator
    • getLabelPrefixString

      public String getLabelPrefixString()
      This will return the text to be concatenated to the left of the label specified by U.
      Returns:
      label prefix
    • setLabelPrefixString

      public void setLabelPrefixString(String labelPrefixString)
      This will set the text to be concatenated to the left of the label specified by U.
      Parameters:
      labelPrefixString - label prefix
    • getLabelSuffixString

      public String getLabelSuffixString()
      This will return the text to be concatenated after the label specified by U.
      Returns:
      label suffix
    • setLabelSuffixString

      public void setLabelSuffixString(String labelSuffixString)
      This will set the text to be concatenated after the label specified by U.
      Parameters:
      labelSuffixString - label suffix
    • getLabelPositionToValue

      public String getLabelPositionToValue()
      This will return a value indicating the ordering of the label specified by U to the calculated unit value.
      Returns:
      label position
    • setLabelPositionToValue

      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" and "P"
      Parameters:
      labelPositionToValue - label position