THotPDF 로드된 양식 필드 편집 메서드

기존 AcroForm에서 필드 제약과 위젯 appearance 딕셔너리를 갱신하면서 증분 저장과 렌더 캐시 정합성을 지킵니다

네이티브 필드 플래그 편집은 상위 비트와 하위 공통 플래그를 포함한 32비트 마스크 전체를 기존 loaded 필드 상속 규칙과 함께 유지합니다

signed 마스크 값, 상속, 네이티브 빌더 동작은 AcroForm 필드 플래그 정밀도를 참고하세요

필드 수준 메서드

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

SetLoadedFormFieldJustification으로 필드 quadding을 정하고 EnsureLoadedFieldAppearanceStream으로 appearance를 재생성하세요. loaded listbox 레이블은 /TI 창이나 저장된 선택을 바꾸지 않고 effective /Q 값을 따릅니다

위젯 지오메트리

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

위젯 appearance와 표시 여부

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

증분 업데이트 동작

예제

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

관련 API

로드 폼 필드 메서드 · 로드 문서 툴킷 · THotPDF