public class ZoomType
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 |
CUSTOM
Zoom percentage is set explicitly.
|
static int |
FULL_PAGE
Zoom percentage is automatically recalculated to fit one full page.
|
static int |
length |
static int |
NONE
Indicates to use the explicit zoom percentage.
|
static int |
PAGE_WIDTH
Zoom percentage is automatically recalculated to fit page width.
|
static int |
TEXT_FIT
Zoom percentage is automatically recalculated to fit text.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String zoomTypeName) |
static java.lang.String |
getName(int zoomType) |
static int[] |
getValues() |
static java.lang.String |
toString(int zoomType) |
public static int CUSTOM
public static int NONE
CUSTOM.public static int FULL_PAGE
public static int PAGE_WIDTH
public static int TEXT_FIT
public static int length