THotPDF Loaded Form Field Editing Métodos

Atualiza restrições de campos e dicionários de aparências de widgets num AcroForm existente preservando a correção de incremental-save e de render cache

A edição nativa de flags de campos retém a máscara completa de 32 bits, incluindo bits altos e flags comuns baixas, com as regras existentes de herança de campos carregados

Veja a precisão de flags de campos AcroForm para valores de máscara com sinal, herança e comportamento do builder nativo

Métodos de nível 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 o SetLoadedFormFieldJustification para definir o quadding do campo e depois o EnsureLoadedFieldAppearanceStream para regenerar a aparência; labels carregados de list boxes honram o valor /Q efetivo sem mudar a janela /TI nem as seleções armazenadas

Geometria 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);

Aparência e visibilidade 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);

Comportamento de updates incrementais

Exemplo

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 formulário carregados · Toolkit de documentos carregados · THotPDF