ZoomType enumeration

ZoomType enumeration

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

Members

NameDescription
CustomZoom percentage is set explicitly. It is not recalculated automatically when control size changes.
NoneIndicates to use the explicit zoom percentage. Same as ZoomType.Custom.
FullPageZoom percentage is automatically recalculated to fit one full page.
PageWidthZoom percentage is automatically recalculated to fit page width.
TextFitZoom 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.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);
builder.writeln("Hello world!");

doc.viewOptions.viewType = aw.Settings.ViewType.PageLayout;
doc.viewOptions.zoomPercent = 50;

expect(doc.viewOptions.zoomType).toEqual(aw.Settings.ZoomType.Custom);
expect(doc.viewOptions.zoomType).toEqual(aw.Settings.ZoomType.None);

doc.save(base.artifactsDir + "ViewOptions.SetZoomPercentage.doc");

See Also