java.lang.Object
com.aspose.words.NumeralFormat
public class NumeralFormat
- extends java.lang.Object
Utility class containing constants.
Indicates the symbol set that is used to represent numbers
while rendering to fixed page formats.
Example:
Shows how to set the numeral format used when saving to PDF.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.getFont().setLocaleId(1025);
builder.writeln("1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 50, 100");
// Create a "PdfSaveOptions" object that we can pass to the document's "Save" method
// to modify how that method converts the document to .PDF.
PdfSaveOptions options = new PdfSaveOptions();
// Set the "NumeralFormat" property to "NumeralFormat.ArabicIndic" to
// use glyphs from the U+0660 to U+0669 range as numbers.
// Set the "NumeralFormat" property to "NumeralFormat.Context" to
// look up the locale to determine what number of glyphs to use.
// Set the "NumeralFormat" property to "NumeralFormat.EasternArabicIndic" to
// use glyphs from the U+06F0 to U+06F9 range as numbers.
// Set the "NumeralFormat" property to "NumeralFormat.European" to use european numerals.
// Set the "NumeralFormat" property to "NumeralFormat.System" to determine the symbol set from regional settings.
options.setNumeralFormat(numeralFormat);
doc.save(getArtifactsDir() + "PdfSaveOptions.SetNumeralFormat.pdf", options);
Field Summary |
static final int | EUROPEAN = 0 | |
European numerals: 0123456789.
|
static final int | ARABIC_INDIC = 1 | |
Numerals used in Arabic: ٠١٢٣٤٥٦٧٨٩.
Unicode range U+0660 - u+0669.
|
static final int | EASTERN_ARABIC_INDIC = 2 | |
Numerals used in Persian and Urdu: ۰۱۲۳۴۵۶۷۸۹.
Unicode range U+06F0 - u+06F9.
|
static final int | CONTEXT = 3 | |
Symbol set is decided from context(locale and RTL property).
|
static final int | SYSTEM = 4 | |
THIS OPTION IS NOT SUPPORTED.
Symbol set is decided from regional settings.
|
EUROPEAN = 0 | |
public static final int EUROPEAN |
-
European numerals: 0123456789.
ARABIC_INDIC = 1 | |
public static final int ARABIC_INDIC |
-
Numerals used in Arabic: ٠١٢٣٤٥٦٧٨٩.
Unicode range U+0660 - u+0669.
EASTERN_ARABIC_INDIC = 2 | |
public static final int EASTERN_ARABIC_INDIC |
-
Numerals used in Persian and Urdu: ۰۱۲۳۴۵۶۷۸۹.
Unicode range U+06F0 - u+06F9.
CONTEXT = 3 | |
public static final int CONTEXT |
-
Symbol set is decided from context(locale and RTL property).
SYSTEM = 4 | |
public static final int SYSTEM |
-
THIS OPTION IS NOT SUPPORTED.
Symbol set is decided from regional settings.
See Also:
Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
Aspose.Words Support Forum - our preferred method of support.