XPDFViewer_Set

Typecommand
DictionaryLCS
LibraryLiveCode Script
Syntax
XPDFViewer_Set <viewerName>, <property>, <value>
Associationsxpdf
Summary

Set a property of the PDF Viewer.

EditionBusiness
Introduced1.0.0
OSmac, windows
Platformsdesktop
Parameters
NameTypeDescription
viewerName

The name of the viewer.

property

The name of the property to set.

value

The value to set the property

Example
XPDFViewer_Set "Document1", "rect", (100, 100, 500, 600)
Description

Set the following properties:

  • rect - The rect of the PDF Viewer relative to the top left of the stack window.
  • fileName - The full file path to the PDF file being viewed
  • visible - The visibility of the PDF Viewer
  • pageNumber - The currently displayed page of the PDF Viewer document.
  • continuousScrollMode - The continuous scroll mode of the PDF document.
  • scroll - The current scroll of the displayed page as horizontal scroll, vertical scroll.
  • pageGravity - The gravity of the page when the view is larger than the scaled page in either width or height. Currently supported page gravities are:
    • topLeft (default) - top left of page sticks to the top left of the view
      • center - the page is centered in the view
  • hScrollbar - Boolean property to show or hide the horizontal scrollbar
  • vScrollbar - Boolean property to show or hide the vertical scrollbar

The following errors may be thrown by the command:

  • XPDF_ERROR: incorrect number of parameters
  • XPDF_ERROR: can't set property
  • XPDF_ERROR: invalid rect
  • XPDF_ERROR: invalid scroll
  • XPDF_ERROR: could not open file
  • XPDF_ERROR: password required or incorrect password
Tagsexternals