Perform operations on demo documents, such as exporting to PDF, retrieving page numbers, jumping to pages, and controlling slide animations.
This document is no longer maintained. Use the new version of Intelligent Media Management.
For a comparison between the new and legacy versions of Intelligent Media Management, see New and legacy version guide.
For more information about document preview in the new version of Intelligent Media Management, see WebOffice frontend development.
Export to PDF
/*
* Currently, only the RangeType and FrameSlides parameters are supported.
* @param: { RangeType?: MsoTriState, FrameSlides?: MsoTriState }
* MsoTriState: {
* msoFalse: 0,
* msoTrue: -1
* }
*/
await demo.PPTApplication().ActivePresentation.ExportAsFixedFormat()Get page numbers and jump to pages
Retrieve the total number of pages
/* * @return: number */ let totalPages = await demo.PPTApplication().ActivePresentation.Slides.CountRetrieve the current page
/* * @return: number */ let totalPages = await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.Slide.SlideIndexJump to a specific page
/* * @param: number */ // Jump to page 3. await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GotoSlide(3)Page change event
function eventHandle() { // do something } // Add a listener for the page change event. demo.PPTApplication().Sub.SlideSelectionChanged = eventHandle // Destroy the event listener. demo.PPTApplication().Sub.SlideSelectionChanged = null
Slide animation control
Slide playback status and animation control are supported in V1.1.2 and later.
Switch to slide playback mode
await demo.PPTApplication().ActivePresentation.SlideShowSettings.Run()Exit slide playback and switch to preview mode
await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.Exit()Next slide animation
await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GotoNextClick()Previous slide animation
await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GotoPreClick()Retrieve the current slide playback status
/* * @return: string ('edit' | 'preview' | 'play') */ let currentState = await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.StateRetrieve the total number of animation steps for the current slide
/* * @return: number */ let clickCount = await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GetClickCount()Retrieve the current animation step for the current slide
/* * @return: number */ let clickCount = await demo.PPTApplication().ActivePresentation.SlideShowWindow.View.GetClickIndex()Callback event for switching to slide playback mode
function eventHandle() { // do something } // Add a listener for the event. demo.PPTApplication().Sub.SlideShowBegin = eventHandle // Destroy the event listener. demo.PPTApplication().Sub.SlideShowBegin = nullCallback event for exiting slide playback and switching to preview mode
function eventHandle() { // do something } // Add a listener for the event. demo.PPTApplication().Sub.SlideShowEnd = eventHandle // Destroy the event listener. demo.PPTApplication().Sub.SlideShowEnd = nullCallback event for the next slide animation
function eventHandle() { // do something } // Add a listener for the event. demo.PPTApplication().Sub.SlideShowOnNext = eventHandle // Destroy the event listener. demo.PPTApplication().Sub.SlideShowOnNext = nullCallback event for the previous slide animation
function eventHandle() { // do something } // Add a listener for the event. demo.PPTApplication().Sub.SlideShowOnPrevious = eventHandle // Destroy the event listener. demo.PPTApplication().Sub.SlideShowOnPrevious = null