public class ViewType
Example:
Document doc = new Document(getMyDir() + "Document.docx");
// We can set the zoom factor to a percentage
doc.getViewOptions().setViewType(ViewType.PAGE_LAYOUT);
doc.getViewOptions().setZoomPercent(50);
// Or we can set the ZoomType to a different value to avoid using percentages
Assert.assertEquals(ZoomType.NONE, doc.getViewOptions().getZoomType());
doc.save(getArtifactsDir() + "ViewOptions.SetZoom.docx");
Field Summary | ||
---|---|---|
static final int | NONE | |
The document shall be rendered in the default view of the application.
|
||
static final int | READING | |
The document shall be rendered in the default view of the application.
|
||
static final int | PAGE_LAYOUT | |
The document shall be opened in a view that displays the document as it will print.
|
||
static final int | OUTLINE | |
The document shall be rendered in a view optimized for outlining or creating long documents.
|
||
static final int | NORMAL | |
The document shall be rendered in a view optimized for outlining or creating long documents.
|
||
static final int | WEB | |
The document shall be rendered in a view mimicking the way this document would be displayed
in a web page.
|
public static final int NONE
public static final int READING
public static final int PAGE_LAYOUT
public static final int OUTLINE
public static final int NORMAL
public static final int WEB