PDFium Component Docs

FormFieldCount 속성

이 API 항목은 식별자, 시그니처, 코드 블록, PDF 용어를 원래 형태로 유지합니다.
컴포넌트: TPdf  ·  유닛: PDFium
현재 활성 page의 form field widget 수입니다

구문

property FormFieldCount: Integer; // read only

설명

FormFieldCount는 현재 활성 page의 AcroForm field widget annotation 수를 반환합니다. 각 entry는 하나의 widget annotation(/Widget subtype과 /FT field type)을 뜻하며, text input, check box, radio button, list box, combo box, push button, signature field가 여기에 해당합니다(PDF 1.7 spec 12.7절)

ActiveFalse이거나, 문서가 AcroForm이 아니거나(FormType = ftNone), page에 interactive widget이 없으면 값은 0입니다. 이것은 page별 metric이며, page에는 document tree의 다른 곳에 정의된 같은 logical field에 속한 widget이 들어 있을 수 있습니다 — PDF는 하나의 field가 여러 widget placement를 가질 수 있게 허용합니다(예: 표지와 마지막 page에 보이는 signature)

FormFieldInfo[Index]0부터 FormFieldCount - 1까지의 index로 사용하면 TPdfFormFieldInfo record를 얻을 수 있습니다: field type, name, alternate name, flag, option label, current value, export value, checked state, font size가 들어 있습니다. page coordinate를 hit test해 field를 얻으려면 대신 FormFieldAt[X, Y]FormFieldInfoAt[X, Y]를 사용하세요

비고

예제

var I: Integer;
var Info: TPdfFormFieldInfo;
for I := 0 to Pdf1.FormFieldCount - 1 do
begin
  Info := Pdf1.FormFieldInfo[I];
  Memo1.Lines.Add(Format('%s = %s', [Info.Name, Info.ExportValue]));
end;

참고 항목

FormField, FormFieldInfo, FormType, HasFormFieldAt