public class NumeralFormat
extends java.lang.Object
Examples:
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);
| Modifier and Type | Field and Description |
|---|---|
static int |
ARABIC_INDIC
Numerals used in Arabic: ٠١٢٣٤٥٦٧٨٩.
|
static int |
CONTEXT
Symbol set is decided from context(locale and RTL property).
|
static int |
EASTERN_ARABIC_INDIC
Numerals used in Persian and Urdu: ۰۱۲۳۴۵۶۷۸۹.
|
static int |
EUROPEAN
European numerals: 0123456789.
|
static int |
length |
static int |
SYSTEM
THIS OPTION IS NOT SUPPORTED.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String numeralFormatName) |
static java.lang.String |
getName(int numeralFormat) |
static int[] |
getValues() |
static java.lang.String |
toString(int numeralFormat) |
public static int EUROPEAN
public static int ARABIC_INDIC
public static int EASTERN_ARABIC_INDIC
public static int CONTEXT
public static int SYSTEM
public static int length