XPDFViewer_GetSelectionRect

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
XPDFViewer_GetSelectionRect(<viewerName>[, <pageNumber>])
Associationsxpdf
Summary

Get the rect of the portion of the selection that appears on the currently loaded page.

EditionBusiness
Introduced1.0.0
OSmac, windows
Platformsdesktop
Parameters
NameTypeDescription
viewerName

The name of the viewer.

pageNumber

An optional pageNumber parameter may be used to get the rect of the selection or portion of selection that appears on the given page.

Example
put XPDFViewer_GetSelectionRect("Document1") into theSelectionRect
Values
NameTypeDescription
return

Rectangle in stack coordinates or 0,0,0,0 if no selection.

Description

Get the rect of the portion of the selection that appears on the currently loaded page. If there is no selection on the current page the function returns 0,0,0,0. Coordinates are in stack coordinates. Adjust the returned rect by the topLeft of the RECT property (viewport) to get coordinates relative to the PDF page.

The following errors may be thrown by the command:

  • XPDF_ERROR: incorrect number of parameters
  • XPDF_ERROR: PDF viewer not found
Tagsexternals