function CopySelectionToClipboard: Boolean;
Pulls the current selection through SelectedText and writes it onto the Windows clipboard as CF_UNICODETEXT via OpenClipboard / EmptyClipboard / GlobalAlloc / SetClipboardData. Returns True on success.
Returns False when there is no selection to copy, when SelectedText resolves to the empty string, or when any of the Win32 clipboard calls fail (e.g. another process holds the clipboard, GlobalAlloc fails, OOM). Defensive on every step — never raises.
Ctrl+C keystroke and to the default Copy popup menu item when AllowUserTextSelection = True and no form field has focus.CloseClipboard) so the data is available to other applications as soon as the call returns.
if not PdfView1.CopySelectionToClipboard then
ShowMessage('Nothing selected, or clipboard unavailable.');