DynaPDF Manual - Page 365

Previous Page 364   Index   Next Page 366

Function Reference
Page 365 of 787
// We have an Unicode name!
UI16* nameW = (UI16*)f.FieldName;
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);
There is no need to check the string format in Visual Basic, VB .Net or C# because a maybe required
conversion is automatically applied.
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.
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
If the return value is equal NO_COLOR the background is transparent.
Default value = NO_COLOR // Transparent
UI32 pdfGetFieldBorderColor(
const PPDF* IPDF) // Instance pointer

Previous topic: GetField (obsolete)

Next topic: GetFieldBorderStyle, GetFieldBorderWidth

Start Chat