Perform operations on PDF documents, such as retrieving the page number, jumping to a page, and setting the page rendering mode.
Important
This document is no longer maintained. Use the new version of Intelligent Media Management.
For a comparison of 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.
Get page numbers and jump to pages
Retrieve the total number of pages
/* * @return: number */ let totalPages = await demo.PDFApplication().ActivePDF.PagesCountRetrieve the current page number
/* * @return: number */ let totalPages = await demo.PDFApplication().ActivePDF.CurrentPageJump to a specific page
/* * @param : { PageNum: number } */ let PageNum = 10 await demo.PDFApplication().ActivePDF.JumpToPage({PageNum})Current page change event
function eventHandle() { // do something } // Add a listener for the current page change event. demo.PDFApplication().Sub.CurrentPageChange = eventHandle // Destroy the event listener. demo.PDFApplication().Sub.CurrentPageChange = null
Set the page rendering mode
This feature is supported in V1.1.2 and later versions.
/*
* 1: Single-page mode
* 0: Multi-page mode
*/
// Set the mode to single-page mode.
demo.PDFApplication().ActivePDF.PageMode = 1该文章对您有帮助吗?