THotPDF Loaded Form Field Editing Methods
يحرر القيود والهندسة والمظهر والدوران والظهور لحقول AcroForm المحمّلة
API
procedure SetLoadedFormFieldFlags(FieldIndex, AFlags: Integer);
procedure SetLoadedFormFieldMaxLength(FieldIndex, AMaxLength: Integer);
procedure SetLoadedFormFieldJustification(FieldIndex: Integer;
AJustification: THPDFFormFieldJustification);
procedure SetLoadedFormFieldTooltip(FieldIndex: Integer; const ATooltip: AnsiString);
- يستبدل
SetLoadedFormFieldFlagsقناع بتات/Ffالكامل لـ PDF - يكتب
SetLoadedFormFieldMaxLengthقيمة/MaxLen؛ والقيمة صفر أو السالبة تزيل الحد SetLoadedFormFieldFlagsSetLoadedFormFieldMaxLengthSetLoadedFormFieldWidgetRectSetLoadedFormFieldVisibility/Qمن 0 إلى 2
هندسة عناصر الواجهة (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);
- فهارس الحقول وعناصر الواجهة تبدأ من الصفر
- يعرض تعداد عناصر الواجهة كل مدخل
/Kidsلمجموعات الاختيار (radio) وغيرها من الحقول متعددة العناصر - تستخدم نقاط المستطيل نقاط فضاء المستخدم الخام في PDF وتُطبَّع قبل الكتابة
مظهر عناصر الواجهة وإظهارها
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);
- يقبل الدوران مضاعفات 90 درجة الموجبة أو السالبة ويخزن قيمة
/MK /Rالمطبعة - تُقيَّد مكونات RGB للحدود والخلفية بمدى DeviceRGB في PDF من 0 إلى 1
- تحدث أدوات ضبط المظهر والإظهار كل عنصر واجهة يتبع الحقل المحدد
- تحافظ الإظهار على أعلام التعليقات غير المتصلة بينما تتحكم في Hidden وNoView وPrint
سلوك التحديث التزايدي
- توسم قواميس الحقول وعناصر الواجهة و
/MKو/BSكمتسخة عند المستوى الذي خُزنت فيه كل قيمة - تبطل التغييرات البصرية نسخ DPI المخزنة مؤقتًا للصفحة المتأثرة فقط
- تفهرس الحقول أو عناصر الواجهة غير الصالحة تترك المستند دون تغيير
مثال
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');