public class ViewType
extends java.lang.Object
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.getViewOptions().setViewType(ViewType.PAGE_LAYOUT);
doc.getViewOptions().setZoomPercent(50);
Assert.assertEquals(ZoomType.CUSTOM, doc.getViewOptions().getZoomType());
Assert.assertEquals(ZoomType.NONE, doc.getViewOptions().getZoomType());
doc.save(getArtifactsDir() + "ViewOptions.SetZoomPercentage.doc");
| Modifier and Type | Field and Description |
|---|---|
static int |
length |
static int |
NONE
The document shall be rendered in the default view of the application.
|
static int |
NORMAL
The document shall be rendered in a view optimized for outlining or creating long documents.
|
static int |
OUTLINE
The document shall be rendered in a view optimized for outlining or creating long documents.
|
static int |
PAGE_LAYOUT
The document shall be opened in a view that displays the document as it will print.
|
static int |
READING
The document shall be rendered in the default view of the application.
|
static int |
WEB
The document shall be rendered in a view mimicking the way this document would be displayed in a web page.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String viewTypeName) |
static java.lang.String |
getName(int viewType) |
static int[] |
getValues() |
static java.lang.String |
toString(int viewType) |
public static int NONE
public static int READING
public static int PAGE_LAYOUT
public static int OUTLINE
public static int NORMAL
public static int WEB
public static int length