java.lang.Objectcom.aspose.words.ViewOptions
public class ViewOptions
Example:
Document doc = new Document(getMyDir() + "Document.doc");
doc.getViewOptions().setViewType(ViewType.PAGE_LAYOUT);
doc.getViewOptions().setZoomPercent(50);
doc.save(getMyDir() + "Document.SetZoom Out.doc");
Property Getters/Setters Summary | ||
---|---|---|
boolean | getDisplayBackgroundShape() | |
void | setDisplayBackgroundShape(boolean value) | |
Controls display of the background shape in print layout view. | ||
boolean | getDoNotDisplayPageBoundaries() | |
void | setDoNotDisplayPageBoundaries(boolean value) | |
Turns off display of the space between the top of the text and the top edge of the page. | ||
boolean | getFormsDesign() | |
void | setFormsDesign(boolean value) | |
Specifies whether the document is in forms design mode. | ||
int | getViewType() | |
void | setViewType(int value) | |
Controls the view mode in Microsoft Word. The value of the property is ViewType integer constant. | ||
int | getZoomPercent() | |
void | setZoomPercent(int value) | |
Gets or sets the percentage (between 10 and 500) at which you want to view your document. | ||
int | getZoomType() | |
void | setZoomType(int value) | |
Gets or sets a zoom value based on the size of the window. The value of the property is ZoomType integer constant. |
Property Getters/Setters Detail |
---|
getDisplayBackgroundShape/setDisplayBackgroundShape | |
public boolean getDisplayBackgroundShape() / public void setDisplayBackgroundShape(boolean value) |
getDoNotDisplayPageBoundaries/setDoNotDisplayPageBoundaries | |
public boolean getDoNotDisplayPageBoundaries() / public void setDoNotDisplayPageBoundaries(boolean value) |
getFormsDesign/setFormsDesign | |
public boolean getFormsDesign() / public void setFormsDesign(boolean value) |
Currently works only for documents in WordML format.
getViewType/setViewType | |
public int getViewType() / public void setViewType(int value) |
Although Aspose.Words is able to read and write this option, its usage is application-specific. For example MS Word 2013 does not respect the value of this option.
Example:
The following code shows how to make sure the document is displayed at 50% zoom when opened in Microsoft Word.Document doc = new Document(getMyDir() + "Document.doc"); doc.getViewOptions().setViewType(ViewType.PAGE_LAYOUT); doc.getViewOptions().setZoomPercent(50); doc.save(getMyDir() + "Document.SetZoom Out.doc");
getZoomPercent/setZoomPercent | |
public int getZoomPercent() / public void setZoomPercent(int value) |
If value is 0 then this property uses 100 instead, else if value is less than 10 or greater than 500 this property throws.
Although Aspose.Words is able to read and write this option, its usage is application-specific. For example MS Word 2013 does not respect the value of this option.
Example:
The following code shows how to make sure the document is displayed at 50% zoom when opened in Microsoft Word.Document doc = new Document(getMyDir() + "Document.doc"); doc.getViewOptions().setViewType(ViewType.PAGE_LAYOUT); doc.getViewOptions().setZoomPercent(50); doc.save(getMyDir() + "Document.SetZoom Out.doc");
getZoomType/setZoomType | |
public int getZoomType() / public void setZoomType(int value) |