获取页码、跳转页

获取总页数

  1. /*
  2. * @return: number
  3. */
  4. let totalPages = await demo.PDFApplication().ActivePDF.PagesCount

获取当前页

  1. /*
  2. * @return: number
  3. */
  4. let totalPages = await demo.PDFApplication().ActivePDF.CurrentPage

跳转到相应页

  1. /*
  2. * @param : { PageNum: number }
  3. */
  4. let PageNum = 10
  5. await demo.PDFApplication().ActivePDF.JumpToPage({PageNum})

当前页改变事件

  1. function eventHandle() {
  2. // do something
  3. }
  4. // 监听
  5. demo.PDFApplication().Sub.CurrentPageChange = eventHandle
  6. // 销毁
  7. demo.PDFApplication().Sub.CurrentPageChange = null