ZoomType

ZoomType enumeration

Possible values for how large or small the document appears on the screen in Microsoft Word.

public enum ZoomType

Values

NameValueDescription
Custom0Zoom percentage is set explicitly. It is not recalculated automatically when control size changes.
None0Indicates to use the explicit zoom percentage. Same as Custom.
FullPage1Zoom percentage is automatically recalculated to fit one full page.
PageWidth2Zoom percentage is automatically recalculated to fit page width.
TextFit3Zoom percentage is automatically recalculated to fit text.

Examples

Shows how to set a custom zoom factor, which older versions of Microsoft Word will apply to a document upon loading.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Hello world!");

doc.ViewOptions.ViewType = ViewType.PageLayout;
doc.ViewOptions.ZoomPercent = 50;

Assert.AreEqual(ZoomType.Custom, doc.ViewOptions.ZoomType);
Assert.AreEqual(ZoomType.None, doc.ViewOptions.ZoomType);

doc.Save(ArtifactsDir + "ViewOptions.SetZoomPercentage.doc");

See Also