Select Pages

<< Click to Display Table of Contents >>

Navigation:  Commands >

Select Pages

WPViewPDF allows to to select pages by mouseclick or through code.

 

The interactive selection is enabled by COMPDF_SelectMode.

 

To select pages by code and to work with selections this commands can be used:

 

COMPDF_PageSelectionCount = 246

 

Returns the count of selected pages.

 

COMPDF_PageSelectionGet   = 247

 

Checks if a page is selected. Pass zero based page number. Result = 1, if selected.

 

COMPDF_PageSelectionClear = 248

 

Removes previous selection

 

COMPDF_PageSelectionAdd   = 249

 

Select one additional page. Pass zero based page number. Result = count of selected pages.  (Passs -1 to return Count)

 

 

COMPDF_PageSelectionDel   = 250

 

Removes Selection from Page. Pass zero based page number.

Result = count of selected pages.

 

COMPDF_PageSelectionToggle= 258

 

 

Toggles state for a certain page. Pass zero based page number. Result = count of selected pages.

 

COMPDF_PageSelectionInvert= 251

 

Inverts Selection. Result = count of selected pages.

 

 

COMPDF_PageSelectionSaveRestore  = 259

 

Saves the selection markers to a buffer and clears the selection.

With Param=1 it restores the buffer.

 

 

COMPDF_SYNC_CURRENT_AS_SELECTED = 1302

 

Synchronizes the current and the selected page. The current page should always also be selected and updated while scrolling the document.

 

 

COMPDF_BEGIN_SELECTION    = 1300

COMPDF_END_SELECTION      = 1301

 

COMPDF_BEGIN_SELECTION locks the SelectionChange event and the screen update until COMPDF_END_SELECTION is called.

 

The event OnViewerMessage (equal to window message WM_PDF_EVENT) is called when the selection is changed.  The id of the selection change messe is MSGPDF_CHANGESELPAGE=108

 

Also note the ViewOption: wpHidePageSelection