MeasurementUnits
Contents
[
Hide
]Inheritance: java.lang.Object
public class MeasurementUnits
Specifies the unit of measurement.
Examples:
Shows how to make a saved document conform to an older ODT schema.
Document doc = new Document(getMyDir() + "Rendering.docx");
OdtSaveOptions saveOptions = new OdtSaveOptions();
{
saveOptions.setMeasureUnit(OdtSaveMeasureUnit.CENTIMETERS);
saveOptions.isStrictSchema11(exportToOdt11Specs);
}
doc.save(getArtifactsDir() + "OdtSaveOptions.Odt11Schema.odt", saveOptions);
Fields
Field | Description |
---|---|
CENTIMETERS | Centimeters. |
INCHES | Inches. |
MILLIMETERS | Millimeters. |
PICAS | Picas (commonly used in traditional typewriter font spacing). |
POINTS | Points. |
length |
Methods
Method | Description |
---|---|
fromName(String measurementUnitsName) | |
getName(int measurementUnits) | |
getValues() | |
toString(int measurementUnits) |
CENTIMETERS
public static int CENTIMETERS
Centimeters.
INCHES
public static int INCHES
Inches.
MILLIMETERS
public static int MILLIMETERS
Millimeters.
PICAS
public static int PICAS
Picas (commonly used in traditional typewriter font spacing).
POINTS
public static int POINTS
Points.
length
public static int length
fromName(String measurementUnitsName)
public static int fromName(String measurementUnitsName)
Parameters:
Parameter | Type | Description |
---|---|---|
measurementUnitsName | java.lang.String |
Returns: int
getName(int measurementUnits)
public static String getName(int measurementUnits)
Parameters:
Parameter | Type | Description |
---|---|---|
measurementUnits | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int measurementUnits)
public static String toString(int measurementUnits)
Parameters:
Parameter | Type | Description |
---|---|---|
measurementUnits | int |
Returns: java.lang.String