PDFPAGE_CreateControl_Edit
IPDFDocument3 :: Annotations

See Also Example
Collapse All

Creates anĀ edit control in a PDF document.

Syntax

LONG PDFPAGE_CreateControl_Edit (
BSTR editName,
LONG left,
LONG top,
LONG right,
LONG bottom
)
Parameters
editName
Name of the control

left
X coordinate of the left-top corner of the bounding rectangle.

top
Y coordinate of the left-top corner of the bounding rectangle.

right
X coordinate of the bottom-right corner of the bounding rectangle

bottom
Y coordinate of the bottom-right corner of the bounding rectangle

Return value
Index of the edit control

Remarks

This method creates an edit control with name editName on the current PDF page in an area bounded by the coordinates given.

The return value is an annotation/control identifier in document's annotations collection and can be used in AddControlToAction, CurrentAnnotationIndex.

Equivalent in new interface: IPDFDocument4::AddEditBox.

Example

Creating an Edit Box

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_CreateControl_Edit('edt1', 10, 10, 110, 23);
PDF.PDFANNOTATION_Text := 'Text';
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_CreateControl_Edit("edt1", 10, 10, 110, 23);
PDF->PDFANNOTATION_Text = "Text";
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_CreateControl_Edit("edt1", 10, 10, 110, 23);
PDF.PDFANNOTATION_Text = "Text";
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_CreateControl_Edit "edt1", 10, 10, 110, 23
PDF.PDFANNOTATION_Text = "Text"
PDF.EndDoc

See Also

Reference