THotPDF Loaded Form Field Editing Métodos

Actualiza restricciones de campo y apariencia de widgets en un AcroForm existente

La edición nativa de flags de campos retiene la máscara completa de 32 bits, incluidos los bits altos y los flags comunes bajos, con las reglas existentes de herencia de campos cargados

Consulte precisión de flags de campos AcroForm para los valores de máscara con signo, la herencia y el comportamiento del builder nativo

Métodos a nivel de campo

procedure SetLoadedFormFieldFlags(FieldIndex, AFlags: Integer);
procedure SetLoadedFormFieldMaxLength(FieldIndex, AMaxLength: Integer);
procedure SetLoadedFormFieldJustification(FieldIndex: Integer;
  AJustification: THPDFFormFieldJustification);
procedure SetLoadedFormFieldTooltip(FieldIndex: Integer; const ATooltip: AnsiString);

Use SetLoadedFormFieldJustification para establecer el quadding del campo y después EnsureLoadedFieldAppearanceStream para regenerar la apariencia; las etiquetas de listbox cargadas respetan el valor efectivo de /Q sin cambiar la ventana /TI ni las selecciones almacenadas

Geometría de widgets

function GetLoadedFormFieldWidgetCount(FieldIndex: Integer): Integer;
function GetLoadedFormFieldWidgetRect(FieldIndex, WidgetIndex: Integer;
  out ARect: THPDFRect): boolean;
procedure SetLoadedFormFieldWidgetRect(FieldIndex, WidgetIndex: Integer;
  X1, Y1, X2, Y2: Single);

Apariencia y visibilidad de widgets

procedure SetLoadedFormFieldRotation(FieldIndex, ADegrees: Integer);
procedure SetLoadedFormFieldBorderColor(FieldIndex: Integer;
  ARed, AGreen, ABlue: Single);
procedure SetLoadedFormFieldVisibility(FieldIndex: Integer;
  AVisible, APrintable: boolean);
procedure SetLoadedFormFieldBorderWidth(FieldIndex: Integer; AWidth: Single);
procedure SetLoadedFormFieldBackgroundColor(FieldIndex: Integer;
  ARed, AGreen, ABlue: Single);

Comportamiento de actualización incremental

Ejemplo

PDF.BeginIncrementalUpdate('input.pdf');
PDF.SetLoadedFormFieldMaxLength(0, 40);
PDF.SetLoadedFormFieldJustification(0, ffjCenter);
PDF.SetLoadedFormFieldRotation(0, 90);
PDF.SetLoadedFormFieldBorderColor(0, 0.1, 0.4, 0.8);
PDF.SetLoadedFormFieldWidgetRect(1, 1, 80, 150, 100, 170);
PDF.SaveIncrementalUpdate('updated.pdf');

APIs relacionadas

Métodos de campos de formulario cargados · Kit de herramientas de documentos cargados · THotPDF