function CopySelectionToClipboard: Boolean;
On Windows, obtains the selection through SelectedText and places it on the clipboard as CF_UNICODETEXT, using OpenClipboard / EmptyClipboard / GlobalAlloc / SetClipboardData; success returns True
Returns False when there is no selection to copy, when SelectedText resolves to the empty string, or when a Win32 clipboard call fails, including memory allocation or unavailable access
Since v3.126.0, Windows clipboard opening allows 100ms of limited retries for transient contention without pumping UI messages; access still unavailable at the end returns False
Native Free Pascal/LCL on Linux and macOS converts the component's UTF-16 selection for the widget set's UTF-8 clipboard API; Windows alone uses the clipboard retry allowance, and native access needs a working desktop clipboard service
Ctrl+C keystroke and to the default Copy popup menu item when AllowUserTextSelection = True and no form field has focusCloseClipboard releases access so other applications can read the copied data
if not PdfView1.CopySelectionToClipboard then
ShowMessage('Nothing selected, or clipboard unavailable.');