Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 351

Previous Page 350   Index   Next Page 352

Function Reference
Page 351 of 750
UI16* nameW = (UI16*)f.FieldName;
}
Delphi:
The Delphi interface contains a special function to convert the returned Ansi string back to Unicode:
if not pdf.GetField(aField, f) then Exit;
if f.FielNameLen > 0 and StrLen(f.FieldName) <> f.FieldNameLen then begin
// Use the function ToUnicode of the class TPDF to convert the string
// back to Unicode
nameW := pdf.ToUnicode(f.FieldName, f.FieldNameLen * 2);
end;
There is no need to check the string format in Visual Basic, VB .Net or C# because a maybe required
conversion is automatically applied.
Remarks:
It is also possible to enumerate the fields on a per page basis with GetPageField(). The export values
of combo and list boxes can be accessed with GetFieldExpValueEx().
Return values:
If the function succeeds the return value 1 and the structure Field is filled with values. If the function
fails the return value is 0.
GetFieldBackColor
Syntax:
UI32 pdfGetFieldBackColor(
const PPDF* IPDF, // Instance pointer
The function returns the default background color used for newly created interactive form fields.
Note that color values must be defined in the current color space. See SetColorSpace() for further
information.
If the return value is equal NO_COLOR the background is transparent.
#define NO_COLOR 0xFFFFFFF1
Default value = NO_COLOR // Transparent
GetFieldBorderColor
Syntax:
UI32 pdfGetFieldBorderColor(
const PPDF* IPDF) // Instance pointer
The function returns the default border color used for newly created interactive form fields. Note
that color values must be defined in the current color space. See SetColorSpace() for further
information.
If the return value is equal NO_COLOR the border is transparent.
 

Previous topic: GetField (obsolete)

Next topic: GetFieldChoiceValue