|
|
|
|
|
- Properties specific to pdfControl variables
pdfControl (Variable type) In french: pdfChamp
The pdfControl type is used to get all the characteristics and values of a control present in a PDF form. You can define and change the characteristics of this control using different WLanguage properties. Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
LooperDeleteAll(LOOP_Control)
CurrentPDF is pdfDocument = PDF_NoName1.Value
sPath is string = CurrentPDF.Value
Trace(sPath)
FOR i = 1 _TO_ CurrentPDF.Page.Count
page is pdfPage = CurrentPDF.Page[i]
FOR j = 1 _TO_ page.Control..Count
control is pdfControl = page.Control[j]
let sName = control.Nom
let sValue = control.Value
let sType = ControlTypeToReadableFormat(control.Type)
let sOptions = ListOption(control)
LOOP_Control.AddLine(i, j, sName, sType, sValue, sOptions)
IF sValue <> "" THEN
LOOP_Control[LOOP_Control.Count].EDT_Value.BackgroundColor = YellowToolhelp
END
IF sOptions = "" THEN
LOOP_Control[LOOP_Control.Count].EDT_Option.Grayed = True
ELSE
LOOP_Control[LOOP_Control.Count].EDT_Option.Grayed =False
END
END
END
INTERNAL PROCEDURE ListOption(control is pdfControl): string
sOptions is string
FOR i = 1 _TO_ control.Option..Count
IF sOptions <> "" THEN sOptions += CR
sOptions += i + ": " + control.Option[i].Caption
END
RETURN sOptions
END
INTERNAL PROCEDURE ControlTypeToReadableFormat(nType): string
SWITCH nType
CASE typText: RETURN "Edit control"
CASE typComboWE: RETURN "Editable Combo Box"
CASE typComboNE: RETURN "Non-editable Combo Box"
CASE typCheckBox: RETURN "Check Box"
CASE typRadioButton: RETURN "Radio Button"
CASE typList: RETURN "List Box"
OTHER CASE: RETURN "Unknown"
END
END
Properties Properties specific to pdfControl variables The following properties can be used to handle pdfControl variables: | | | Property name | Type used | Effect |
---|
Name | Character string | Name of the control present in the PDF form. This property is read-only. | Option | Array of pdfControlOption | Control value. This value can be modified. | Type | Integer constant | Type of control: - typComboWE: Editable Combo Box.
- typCheckBox: Check Box.
- typList: List of elements.
- typSelect: Radio Button.
- typText: Text input control.
This property is read-only. | Value | Corresponding type | Value contained in the control. This value can be modified. |
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|