PDFium Delphi Component Docs

CopySelectedFormTextToClipboard method

Component: TPdfView  ·  Unit: PDFium
Copies the selected text inside the focused AcroForm widget to the Windows clipboard as CF_UNICODETEXT

Syntax

function CopySelectedFormTextToClipboard: Boolean;

Description

The method reads the native focused-widget selection through GetSelectedFormText and writes non-empty text to the clipboard using the same Unicode path as CopySelectionToClipboard

It returns True after the clipboard accepts the text and False when the view is inactive, no widget is focused, the widget selection is empty or a clipboard operation fails

An empty selection is rejected before opening or clearing the clipboard, so an unsuccessful no-focus call preserves existing clipboard content

Remarks

Example

if PdfView1.SelectAllFormText then
  PdfView1.CopySelectedFormTextToClipboard;

See Also

GetSelectedFormText, SelectAllFormText, CutSelectedFormTextToClipboard, PasteFormTextFromClipboard, FocusFormField, CopySelectionToClipboard