Click or drag to resize

OdtSaveMeasureUnit Enumeration

Specified units of measure to apply to measurable document content such as shape, widths and other during saving.

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 21.5.0

ExpandedSyntax

public enum OdtSaveMeasureUnit

ExpandedMembers

  Member nameValueDescription
Centimeters0 Specifies that the document content is saved using centimeters.
Inches1 Specifies that the document content is saved using inches.

ExpandedExamples

Shows how to use different measurement units to define style parameters of a saved ODT document.
Document doc = new Document(MyDir + "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
{
    MeasureUnit = odtSaveMeasureUnit
};

doc.Save(ArtifactsDir + "OdtSaveOptions.Odt11Schema.odt", saveOptions);

ExpandedSee Also