Presentation View Properties
The normal view consists of three content regions: the slide itself, a side content region, and a bottom content region. Properties pertaining to the positioning of the different content regions. This information allows the application to save its view state to the file, so that when reopened the view is in the same state as when the presentation was last saved.
Method IViewProperties.getNormalViewProperties has been added to provide access to normal view properties of presentation.
INormalViewProperties, INormalViewRestoredProperties interfaces and its descendants, SplitterBarStateType enum have been added.
About INormalViewProperties
Represents normal view properties.
Methods getShowOutlineIcons and setShowOutlineIcons specifies whether the application should show icons if displaying outline content in any of the content regions of normal view mode.
Methods getSnapVerticalSplitter and setSnapVerticalSplitter specifies whether the vertical splitter should snap to a minimized state when the side region is sufficiently small.
Property getPreferSingleView and setPreferSingleView specifies whether the user prefers to see a full-window single-content region over the standard normal view with three content regions. If enabled, the application may choose to display one of the content regions in the entire window.
Methods getVerticalBarState and getHorizontalBarState specify the state that the horizontal or vertical splitter bar should be shown in. A horizontal splitter bar separates the slide from the content region below the slide, vertical splitter bar separates the slide from the side content region. Possible values are: SplitterBarStateType.Minimized, SplitterBarStateType.Maximized and SplitterBarStateType.Restored.
Methods getRestoredLeft and getRestoredTop specify the sizing of the top or side slide region of the normal view, when SplitterBarStateType.Restored value applied for getVerticalBarState and getHorizontalBarState accordingly.
About Restoring INormalViewProperties
Specifies the sizing of the slide region (width when a child of getRestoredTop, height when a child of getRestoredLeft) of the normal view, when the region is of a variable restored size (neither minimized nor maximized).
Method getDimensionSize specifies the size of the slide region (width when a child of restoredTop, height when a child of restoredLeft).
Method getAutoAdjust specifies whether the size of the side content region should compensate for the new size when resizing the window containing the view within the application
An example is given below shows how can you access ViewProperties.getNormalViewProperties properties for a presentation.
Presentation pres = new Presentation();
try {
pres.getViewProperties().getNormalViewProperties().setHorizontalBarState(SplitterBarStateType.Restored);
pres.getViewProperties().getNormalViewProperties().setVerticalBarState(SplitterBarStateType.Maximized);
// Restore the view properties of the presentation
pres.getViewProperties().getNormalViewProperties().getRestoredTop().setAutoAdjust(true);
pres.getViewProperties().getNormalViewProperties().getRestoredTop().setDimensionSize(80);
pres.getViewProperties().getNormalViewProperties().setShowOutlineIcons(true);
pres.save("presentation_normal_view_state.pptx", SaveFormat.Pptx);
} finally {
pres.dispose();
}
Set Default Zoom Value
In order to set the view properties. Please follow the steps below:
- Create an instance of Presentation class.
- Set View Properties of Presentation.
- Write the presentation as a PPTX file. In the example given below, we have set the zoom value for slide view as well as notes view.
Presentation presentation = new Presentation();
try {
// Setting the view properties of the presentation
presentation.getViewProperties().getSlideViewProperties().setScale(100); // Zoom value in percentages for slide view
presentation.getViewProperties().getNotesViewProperties().setScale(100); // Zoom value in percentages for notes view
presentation.save("Zoom_out.pptx", SaveFormat.Pptx);
} finally {
presentation.dispose();
}