THotPDF 読み込み済みフォームフィールド編集メソッド

このページでは、読み込んだ PDF 文書内の注釈、リンク、フォームフィールドを確認または編集するための HotPDF API について説明します

ネイティブのフィールドフラグ編集は、上位ビットと下位の共通フラグを合わせた完全な 32 ビットマスクを保持し、既存のロード済みフィールド継承ルールに従います

符号付きマスク値、継承、ネイティブビルダーの挙動については AcroForm フィールドフラグの精度を参照してください

宣言

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

フィールドの quadding は SetLoadedFormFieldJustification で設定し、続いて EnsureLoadedFieldAppearanceStream で外観を再生成してください。ロード済みリストボックスのラベルは、/TI ウィンドウや保存された選択を変えずに、実効的な /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);

ウィジェットの外観と可視性

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

ホーム · 目次 · Loaded Documents · THotPDF · Loaded form field methods · Loaded document toolkit · THotPDF