PDFium Delphi Component Docs

PasteFormTextFromClipboard method

Component: TPdfView  ·  Unit: PDFium
Replaces the current selection in the focused editable AcroForm widget with Unicode clipboard text

Syntax

function PasteFormTextFromClipboard: Boolean;

Description

The method reads a bounded null-terminated CF_UNICODETEXT value from the Windows clipboard and sends it to PDFium's focused form editor

Existing selected text is replaced, while an empty selection inserts the text at the current caret position

It returns False without changing the field when the clipboard has no non-empty Unicode text or the focused widget is not editable

Since v3.126.0, opening the Windows clipboard uses a bounded 100ms retry budget for transient contention without pumping UI messages; exhausted access attempts still return False without changing the field

Remarks

Example

if not PdfView1.PasteFormTextFromClipboard then
  ShowMessage('No editable form field is focused');

See Also

CutSelectedFormTextToClipboard, CopySelectedFormTextToClipboard, SelectAllFormText, FormUndo