Formes
Vue de l’ensemble
‘Form’ est un type dans Aspose.PDF FOSS pour Go.
Le formulaire est la vue AcroForm du document.
Ce type fournit 13 méthodes pour travailler avec des objets de Form dans les programmes Go. Les méthodologies disponibles comprennent: ‘AddCheckbox’, ‘AdDocomboBox’, `AdListBox’ , ‘PushButton’, ‘AdsRadioGroup’, ’AdkTextField’, ‚Fiel’, ‘Flatten’, ‘‘HasFiels’, “NeedAppearances’, ‘’RemoveFiell’’ et 1 méthode supplémentaire. Tous les membres publics sont accessibles à toute application Go après l’installation du package Aspose.PDF FOSS for Go .
méthodes
| Signature | Description |
|---|---|
Flatten() → error | Flatten bakes every form field’s current appearance into its page’s content stream and then removes all fields, their widgets, and the /AcroForm dict, producing a non-interactive document that renders the same. |
Fields() → []Field | Fields returns all leaf form fields as a flat slice. |
Field(name: string) → Field | Field returns the leaf field by FullName, or nil if no such field exists. |
HasField(name: string) → bool | HasField reports whether a leaf field with the given FullName exists. |
NeedAppearances() → bool | NeedAppearances reports whether /AcroForm/NeedAppearances is true, which tells viewers to regenerate cached /AP appearance streams when displaying form fields. |
SetNeedAppearances(v: bool) | SetNeedAppearances toggles /AcroForm/NeedAppearances. |
AddTextField(pageNum: int, rect: Rectangle, name: string) → (*TextBoxField, error) | AddTextField creates a single-line text input on pageNum with the given rectangle and field name, auto-creating /AcroForm and the default Helvetica font resource if needed. |
AddCheckbox(pageNum: int, rect: Rectangle, name: string) → (*CheckboxField, error) | AddCheckbox creates a checkbox widget on pageNum with the given rectangle and field name. |
AddComboBox(pageNum: int, rect: Rectangle, name: string, options: []ChoiceOption) → (*ComboBoxField, error) | AddComboBox creates a single-select dropdown choice field. |
AddListBox(pageNum: int, rect: Rectangle, name: string, options: []ChoiceOption) → (*ListBoxField, error) | AddListBox creates a single-select list field. |
AddPushButton(pageNum: int, rect: Rectangle, name: string, caption: string) → (*ButtonField, error) | AddPushButton creates a non-toggling button. |
AddRadioGroup(name: string, items: []RadioItem) → (*RadioButtonField, error) | AddRadioGroup creates a radio-button parent field plus one widget per item. |
RemoveField(name: string) → bool | RemoveField removes the named field (and all its widget annotations) from /AcroForm/Fields and from each affected page’s /Annots. |
Voir aussi
- Aspose.PDF — Résultats de l’API d’entreprise