public class OdtSaveMeasureUnit
extends java.lang.Object
Examples:
Shows how to use different measurement units to define style parameters of a saved ODT document.
Document doc = new Document(getMyDir() + "Rendering.docx");
// When we export the document to .odt, we can use an OdtSaveOptions object to modify how we save the document.
// We can set the "MeasureUnit" property to "OdtSaveMeasureUnit.Centimeters"
// to define content such as style parameters using the metric system, which Open Office uses.
// We can set the "MeasureUnit" property to "OdtSaveMeasureUnit.Inches"
// to define content such as style parameters using the imperial system, which Microsoft Word uses.
OdtSaveOptions saveOptions = new OdtSaveOptions();
{
saveOptions.setMeasureUnit(odtSaveMeasureUnit);
}
doc.save(getArtifactsDir() + "OdtSaveOptions.Odt11Schema.odt", saveOptions);
| Modifier and Type | Field and Description |
|---|---|
static int |
CENTIMETERS
Specifies that the document content is saved using centimeters.
|
static int |
INCHES
Specifies that the document content is saved using inches.
|
static int |
length |
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String odtSaveMeasureUnitName) |
static java.lang.String |
getName(int odtSaveMeasureUnit) |
static int[] |
getValues() |
static java.lang.String |
toString(int odtSaveMeasureUnit) |