This documentation is deprecated and will no longer be updated. Please use the official documentation at vanillapdf.readthedocs.io.
Vanilla.PDF  2.3.0
Cross-platform toolkit for creating and modifying PDF documents
c_fields.h
Go to the documentation of this file.
1#ifndef _C_FIELDS_H
2#define _C_FIELDS_H
3
7
8#ifdef __cplusplus
9extern "C"
10{
11#endif
12
82 typedef enum {
83 FieldType_Undefined = 0,
84
90
96
102
108
114 } FieldType;
115
120 typedef enum {
121 FieldFlags_None = 0,
122
125
128
131
132 // Button field flags (Table 226)
133
135 FieldFlags_Radio = (1 << 15),
136
139
140 // Text field flags (Table 228)
141
144
147
148 // Choice field flags (Table 230)
149
151 FieldFlags_Combo = (1 << 17),
152
154 FieldFlags_Edit = (1 << 18),
155
157 FieldFlags_Sort = (1 << 19),
158 } FieldFlags;
159
168 VANILLAPDF_API error_type CALLING_CONVENTION FieldCollection_GetSize(FieldCollectionHandle* handle, size_type* result);
169
174 VANILLAPDF_API error_type CALLING_CONVENTION FieldCollection_At(FieldCollectionHandle* handle, size_type at, FieldHandle** result);
175
180 VANILLAPDF_API error_type CALLING_CONVENTION FieldCollection_Release(FieldCollectionHandle* handle);
181
194 VANILLAPDF_API error_type CALLING_CONVENTION Field_CreateFromDictionary(DictionaryObjectHandle* dictionary, FieldHandle** result);
195
201 VANILLAPDF_API error_type CALLING_CONVENTION Field_GetType(FieldHandle* handle, FieldType* result);
202
207 VANILLAPDF_API error_type CALLING_CONVENTION Field_GetName(FieldHandle* handle, StringObjectHandle** result);
208
213 VANILLAPDF_API error_type CALLING_CONVENTION Field_GetAlternateName(FieldHandle* handle, StringObjectHandle** result);
214
220 VANILLAPDF_API error_type CALLING_CONVENTION Field_GetFieldFlags(FieldHandle* handle, FieldFlags* result);
221
226 VANILLAPDF_API error_type CALLING_CONVENTION Field_SetFieldFlags(FieldHandle* handle, FieldFlags value);
227
232 VANILLAPDF_DEPRECATED VANILLAPDF_API error_type CALLING_CONVENTION Field_ToButton(FieldHandle* handle, ButtonFieldHandle** result);
233
238 VANILLAPDF_DEPRECATED VANILLAPDF_API error_type CALLING_CONVENTION Field_ToText(FieldHandle* handle, TextFieldHandle** result);
239
244 VANILLAPDF_DEPRECATED VANILLAPDF_API error_type CALLING_CONVENTION Field_ToChoice(FieldHandle* handle, ChoiceFieldHandle** result);
245
250 VANILLAPDF_DEPRECATED VANILLAPDF_API error_type CALLING_CONVENTION Field_ToSignature(FieldHandle* handle, SignatureFieldHandle** result);
251
255 VANILLAPDF_API error_type CALLING_CONVENTION Field_ToUnknown(FieldHandle* handle, IUnknownHandle** result);
256
260 VANILLAPDF_API error_type CALLING_CONVENTION Field_FromUnknown(IUnknownHandle* handle, FieldHandle** result);
261
266 VANILLAPDF_API error_type CALLING_CONVENTION Field_Release(FieldHandle* handle);
267
279 VANILLAPDF_API error_type CALLING_CONVENTION ButtonField_GetValue(ButtonFieldHandle* handle, NameObjectHandle** result);
280
284 VANILLAPDF_API error_type CALLING_CONVENTION ButtonField_SetValue(ButtonFieldHandle* handle, NameObjectHandle* value);
285
289 VANILLAPDF_API error_type CALLING_CONVENTION ButtonField_ToField(ButtonFieldHandle* handle, FieldHandle** result);
290
294 VANILLAPDF_API error_type CALLING_CONVENTION ButtonField_FromField(FieldHandle* handle, ButtonFieldHandle** result);
295
299 VANILLAPDF_API error_type CALLING_CONVENTION ButtonField_Release(ButtonFieldHandle* handle);
300
311 VANILLAPDF_API error_type CALLING_CONVENTION TextField_GetValue(TextFieldHandle* handle, StringObjectHandle** result);
312
316 VANILLAPDF_API error_type CALLING_CONVENTION TextField_SetValue(TextFieldHandle* handle, StringObjectHandle* value);
317
321 VANILLAPDF_API error_type CALLING_CONVENTION TextField_GetDefaultValue(TextFieldHandle* handle, StringObjectHandle** result);
322
327 VANILLAPDF_API error_type CALLING_CONVENTION TextField_GetMaxLength(TextFieldHandle* handle, IntegerObjectHandle** result);
328
332 VANILLAPDF_API error_type CALLING_CONVENTION TextField_ToField(TextFieldHandle* handle, FieldHandle** result);
333
337 VANILLAPDF_API error_type CALLING_CONVENTION TextField_FromField(FieldHandle* handle, TextFieldHandle** result);
338
342 VANILLAPDF_API error_type CALLING_CONVENTION TextField_Release(TextFieldHandle* handle);
343
354 VANILLAPDF_API error_type CALLING_CONVENTION ChoiceField_GetValue(ChoiceFieldHandle* handle, StringObjectHandle** result);
355
359 VANILLAPDF_API error_type CALLING_CONVENTION ChoiceField_SetValue(ChoiceFieldHandle* handle, StringObjectHandle* value);
360
364 VANILLAPDF_API error_type CALLING_CONVENTION ChoiceField_GetOptionCount(ChoiceFieldHandle* handle, size_type* result);
365
373 VANILLAPDF_API error_type CALLING_CONVENTION ChoiceField_GetOptionAt(ChoiceFieldHandle* handle, size_type index, ObjectHandle** result);
374
378 VANILLAPDF_API error_type CALLING_CONVENTION ChoiceField_ToField(ChoiceFieldHandle* handle, FieldHandle** result);
379
383 VANILLAPDF_API error_type CALLING_CONVENTION ChoiceField_FromField(FieldHandle* handle, ChoiceFieldHandle** result);
384
388 VANILLAPDF_API error_type CALLING_CONVENTION ChoiceField_Release(ChoiceFieldHandle* handle);
389
402 VANILLAPDF_API error_type CALLING_CONVENTION SignatureField_GetValue(SignatureFieldHandle* handle, DigitalSignatureHandle** result);
403
407 VANILLAPDF_API error_type CALLING_CONVENTION SignatureField_ToField(SignatureFieldHandle* handle, FieldHandle** result);
408
412 VANILLAPDF_API error_type CALLING_CONVENTION SignatureField_FromField(FieldHandle* handle, SignatureFieldHandle** result);
413
417 VANILLAPDF_API error_type CALLING_CONVENTION SignatureField_Release(SignatureFieldHandle* handle);
418
421#ifdef __cplusplus
422};
423#endif
424
425#endif /* _C_FIELDS_H */
This file contains macro declarations for importing and exporting symbols from library boundaries.
This file contains all type forward declarations returned by the library API.
This file contains types and constants used as parameters or return values.
A button field represents an interactive control on the screen that the user can manipulate with the ...
error_type CALLING_CONVENTION ButtonField_FromField(FieldHandle *handle, ButtonFieldHandle **result)
Convert FieldHandle to ButtonFieldHandle.
error_type CALLING_CONVENTION ButtonField_SetValue(ButtonFieldHandle *handle, NameObjectHandle *value)
Set the button field value (/V entry).
error_type CALLING_CONVENTION ButtonField_Release(ButtonFieldHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION ButtonField_GetValue(ButtonFieldHandle *handle, NameObjectHandle **result)
Get the button field value (/V entry) as a name object. For checkboxes, typically /Yes or /Off....
error_type CALLING_CONVENTION ButtonField_ToField(ButtonFieldHandle *handle, FieldHandle **result)
Reinterpret current object as FieldHandle.
A choice field contains several text items, one or more of which shall be selected as the field value...
error_type CALLING_CONVENTION ChoiceField_ToField(ChoiceFieldHandle *handle, FieldHandle **result)
Reinterpret current object as FieldHandle.
error_type CALLING_CONVENTION ChoiceField_GetOptionCount(ChoiceFieldHandle *handle, size_type *result)
Get the number of available options (/Opt entry).
error_type CALLING_CONVENTION ChoiceField_GetOptionAt(ChoiceFieldHandle *handle, size_type index, ObjectHandle **result)
Get the option at the given index.
error_type CALLING_CONVENTION ChoiceField_SetValue(ChoiceFieldHandle *handle, StringObjectHandle *value)
Set the selected value (/V entry).
error_type CALLING_CONVENTION ChoiceField_Release(ChoiceFieldHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION ChoiceField_GetValue(ChoiceFieldHandle *handle, StringObjectHandle **result)
Get the selected value (/V entry).
error_type CALLING_CONVENTION ChoiceField_FromField(FieldHandle *handle, ChoiceFieldHandle **result)
Convert FieldHandle to ChoiceFieldHandle.
A dictionary object is an associative table containing pairs of objects.
Represents document's authenticated digital signature.
Collection of FieldHandle.
error_type CALLING_CONVENTION FieldCollection_GetSize(FieldCollectionHandle *handle, size_type *result)
Get size of field collection.
error_type CALLING_CONVENTION FieldCollection_Release(FieldCollectionHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION FieldCollection_At(FieldCollectionHandle *handle, size_type at, FieldHandle **result)
Get single field from array at specific position.
Base class for all fields.
error_type CALLING_CONVENTION Field_GetType(FieldHandle *handle, FieldType *result)
Return type of field. Result can be used to convert to derived type.
error_type CALLING_CONVENTION Field_FromUnknown(IUnknownHandle *handle, FieldHandle **result)
Convert IUnknownHandle to FieldHandle.
error_type CALLING_CONVENTION Field_GetName(FieldHandle *handle, StringObjectHandle **result)
Get the partial field name (/T entry).
error_type CALLING_CONVENTION Field_ToUnknown(FieldHandle *handle, IUnknownHandle **result)
Reinterpret current object as IUnknownHandle.
VANILLAPDF_DEPRECATED error_type CALLING_CONVENTION Field_ToButton(FieldHandle *handle, ButtonFieldHandle **result)
Reinterpret current object as ButtonFieldHandle.
error_type CALLING_CONVENTION Field_CreateFromDictionary(DictionaryObjectHandle *dictionary, FieldHandle **result)
Create a field from a dictionary object. The field type is determined by the /FT entry in the diction...
VANILLAPDF_DEPRECATED error_type CALLING_CONVENTION Field_ToText(FieldHandle *handle, TextFieldHandle **result)
Reinterpret current object as TextFieldHandle.
error_type CALLING_CONVENTION Field_SetFieldFlags(FieldHandle *handle, FieldFlags value)
Set the field flags (/Ff entry).
VANILLAPDF_DEPRECATED error_type CALLING_CONVENTION Field_ToSignature(FieldHandle *handle, SignatureFieldHandle **result)
Reinterpret current object as SignatureFieldHandle.
error_type CALLING_CONVENTION Field_Release(FieldHandle *handle)
Decrement the internal reference counter.
VANILLAPDF_DEPRECATED error_type CALLING_CONVENTION Field_ToChoice(FieldHandle *handle, ChoiceFieldHandle **result)
Reinterpret current object as ChoiceFieldHandle.
error_type CALLING_CONVENTION Field_GetFieldFlags(FieldHandle *handle, FieldFlags *result)
Get the field flags (/Ff entry).
error_type CALLING_CONVENTION Field_GetAlternateName(FieldHandle *handle, StringObjectHandle **result)
Get the alternate field name (/TU entry), used as tooltip text.
Base class for reference counting.
Integer objects represent mathematical integers.
A name object is an atomic symbol uniquely defined by a sequence of characters.
Base class for syntactic tokens.
A signature field (PDF 1.3) is a form field that contains a digital signature.
error_type CALLING_CONVENTION SignatureField_GetValue(SignatureFieldHandle *handle, DigitalSignatureHandle **result)
A signature dictionary containing the signature and specifying various attributes of the signature fi...
error_type CALLING_CONVENTION SignatureField_FromField(FieldHandle *handle, SignatureFieldHandle **result)
Convert FieldHandle to SignatureFieldHandle.
error_type CALLING_CONVENTION SignatureField_ToField(SignatureFieldHandle *handle, FieldHandle **result)
Reinterpret current object as FieldHandle.
error_type CALLING_CONVENTION SignatureField_Release(SignatureFieldHandle *handle)
Decrement the internal reference counter.
Reprsents human readable text.
A text field is a box or space for text fill-in data typically entered from a keyboard.
error_type CALLING_CONVENTION TextField_GetMaxLength(TextFieldHandle *handle, IntegerObjectHandle **result)
Get the maximum length of the text field (/MaxLen entry).
error_type CALLING_CONVENTION TextField_GetValue(TextFieldHandle *handle, StringObjectHandle **result)
Get the text field value (/V entry).
error_type CALLING_CONVENTION TextField_SetValue(TextFieldHandle *handle, StringObjectHandle *value)
Set the text field value (/V entry).
error_type CALLING_CONVENTION TextField_GetDefaultValue(TextFieldHandle *handle, StringObjectHandle **result)
Get the default value (/DV entry).
error_type CALLING_CONVENTION TextField_ToField(TextFieldHandle *handle, FieldHandle **result)
Reinterpret current object as FieldHandle.
error_type CALLING_CONVENTION TextField_Release(TextFieldHandle *handle)
Decrement the internal reference counter.
error_type CALLING_CONVENTION TextField_FromField(FieldHandle *handle, TextFieldHandle **result)
Convert FieldHandle to TextFieldHandle.
FieldType
Available types of fields.
Definition c_fields.h:82
FieldFlags
Bit flags common to all field types (PDF 32000-1:2008, Table 221)
Definition c_fields.h:120
@ FieldType_Text
A text field is a box or space for text fill-in data typically entered from a keyboard.
Definition c_fields.h:101
@ FieldType_NonTerminal
Many field attributes are inheritable, meaning that if they are not explicitly specified for a given ...
Definition c_fields.h:89
@ FieldType_Button
A button field represents an interactive control on the screen that the user can manipulate with the ...
Definition c_fields.h:95
@ FieldType_Signature
A signature field (PDF 1.3) is a form field that contains a digital signature.
Definition c_fields.h:113
@ FieldType_Choice
A choice field contains several text items, one or more of which shall be selected as the field value...
Definition c_fields.h:107
@ FieldFlags_NoExport
The field shall not be exported by a submit-form action.
Definition c_fields.h:130
@ FieldFlags_Multiline
The field may contain multiple lines of text.
Definition c_fields.h:143
@ FieldFlags_Password
The field is intended for entering a secure password.
Definition c_fields.h:146
@ FieldFlags_Required
The field shall have a value before the form can be submitted.
Definition c_fields.h:127
@ FieldFlags_PushButton
The field is a push button that does not retain a permanent value.
Definition c_fields.h:138
@ FieldFlags_ReadOnly
The user may not change the value of the field.
Definition c_fields.h:124
@ FieldFlags_Edit
The combo box includes an editable text box.
Definition c_fields.h:154
@ FieldFlags_Sort
The field options shall be sorted alphabetically.
Definition c_fields.h:157
@ FieldFlags_Combo
The choice field is a combo box (otherwise list box)
Definition c_fields.h:151
@ FieldFlags_Radio
The field is a set of radio buttons (otherwise checkbox if button type)
Definition c_fields.h:135
uint32_t error_type
This is return value type of all API functions.
Definition c_types.h:25
uint32_t size_type
Size type defined in standard library.
Definition c_types.h:62