public AcroCheckboxField(DictionaryToken dictionary, string fieldType, AcroButtonFieldFlags fieldFlags, AcroFieldCommonInformation information, NameToken currentValue) : base(dictionary, fieldType, (uint)fieldFlags, information) { Flags = fieldFlags; CurrentValue = currentValue; }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="AcroCheckboxesField"/>. /// </summary> internal AcroCheckboxesField(DictionaryToken dictionary, string fieldType, AcroButtonFieldFlags fieldFlags, AcroFieldCommonInformation information, IReadOnlyList <AcroFieldBase> children) : base(dictionary, fieldType, (uint)fieldFlags, information, AcroFieldType.Checkboxes, children) { }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="AcroRadioButtonsField"/>. /// </summary> public AcroRadioButtonsField(DictionaryToken dictionary, string fieldType, AcroButtonFieldFlags fieldFlags, AcroFieldCommonInformation information, IReadOnlyList <AcroFieldBase> children) : base(dictionary, fieldType, (uint)fieldFlags, information, AcroFieldType.RadioButtons, children) { Flags = fieldFlags; }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="T:UglyToad.PdfPig.AcroForms.Fields.AcroSignatureField" />. /// </summary> public AcroSignatureField(DictionaryToken dictionary, string fieldType, uint fieldFlags, AcroFieldCommonInformation information, int?pageNumber, PdfRectangle?bounds) : base(dictionary, fieldType, fieldFlags, AcroFieldType.Signature, information, pageNumber, bounds) { }
/// <summary> /// Create a new <see cref="AcroFieldBase"/>. /// </summary> /// <param name="dictionary">The dictionary for this field.</param> /// <param name="fieldType">The type of this field.</param> /// <param name="fieldFlags">The flags specifying behaviour for this field.</param> /// <param name="information">Additional information for this field.</param> protected AcroFieldBase(DictionaryToken dictionary, string fieldType, uint fieldFlags, AcroFieldCommonInformation information) { Dictionary = dictionary ?? throw new ArgumentNullException(nameof(dictionary)); FieldType = fieldType ?? throw new ArgumentNullException(nameof(fieldType)); FieldFlags = fieldFlags; Information = information ?? new AcroFieldCommonInformation(null, null, null, null); }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="AcroRadioButtonsField"/>. /// </summary> public AcroRadioButtonsField(DictionaryToken dictionary, string fieldType, AcroButtonFieldFlags fieldFlags, AcroFieldCommonInformation information, int?pageNumber, PdfRectangle?bounds) : base(dictionary, fieldType, (uint)fieldFlags, AcroFieldType.RadioButton, information, pageNumber, bounds) { Flags = fieldFlags; }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="AcroNonTerminalField"/>. /// </summary> internal AcroNonTerminalField(DictionaryToken dictionary, string fieldType, uint fieldFlags, AcroFieldCommonInformation information, AcroFieldType acroFieldType, IReadOnlyList <AcroFieldBase> children) : base(dictionary, fieldType, fieldFlags, acroFieldType, information, null, null) { Children = children ?? throw new ArgumentNullException(nameof(children)); }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="T:UglyToad.PdfPig.AcroForms.Fields.AcroTextField" />. /// </summary> /// <param name="dictionary">The dictionary for this field.</param> /// <param name="fieldType">The type of this field, must be <see cref="F:UglyToad.PdfPig.Tokens.NameToken.Ch" />.</param> /// <param name="fieldFlags">The flags specifying behaviour for this field.</param> /// <param name="information">Additional information for this field.</param> /// <param name="value">The text value.</param> /// <param name="maxLength">The maximum length.</param> public AcroTextField(DictionaryToken dictionary, string fieldType, AcroTextFieldFlags fieldFlags, AcroFieldCommonInformation information, string value, int?maxLength) : base(dictionary, fieldType, (uint)fieldFlags, information) { Flags = fieldFlags; Value = value; MaxLength = maxLength; IsRichText = Flags.HasFlag(AcroTextFieldFlags.RichText); IsMultiline = Flags.HasFlag(AcroTextFieldFlags.Multiline); }
/// <summary> /// Create a new <see cref="AcroComboBoxField"/>. /// </summary> /// <param name="dictionary">The dictionary for this field.</param> /// <param name="fieldType">The type of this field, must be <see cref="NameToken.Ch"/>.</param> /// <param name="fieldFlags">The flags specifying behaviour for this field.</param> /// <param name="information">Additional information for this field.</param> /// <param name="options">The options in this field.</param> /// <param name="selectedOptionIndices">The indices of the selected options where there are multiple with the same name.</param> /// <param name="selectedOptions">The names of the selected options.</param> public AcroComboBoxField(DictionaryToken dictionary, string fieldType, AcroChoiceFieldFlags fieldFlags, AcroFieldCommonInformation information, IReadOnlyList <AcroChoiceOption> options, IReadOnlyList <string> selectedOptions, IReadOnlyList <int> selectedOptionIndices) : base(dictionary, fieldType, (uint)fieldFlags, information) { Flags = fieldFlags; Options = options ?? throw new ArgumentNullException(nameof(options)); SelectedOptions = selectedOptions ?? throw new ArgumentNullException(nameof(selectedOptions)); SelectedOptionIndices = selectedOptionIndices; }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="AcroRadioButtonField"/>. /// </summary> public AcroRadioButtonField(DictionaryToken dictionary, string fieldType, AcroButtonFieldFlags fieldFlags, AcroFieldCommonInformation information, int?pageNumber, PdfRectangle?bounds, NameToken currentValue, bool isSelected) : base(dictionary, fieldType, (uint)fieldFlags, AcroFieldType.RadioButton, information, pageNumber, bounds) { Flags = fieldFlags; CurrentValue = currentValue; IsSelected = isSelected; }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="T:UglyToad.PdfPig.AcroForms.Fields.AcroTextField" />. /// </summary> /// <param name="dictionary">The dictionary for this field.</param> /// <param name="fieldType">The type of this field, must be <see cref="F:UglyToad.PdfPig.Tokens.NameToken.Ch" />.</param> /// <param name="fieldFlags">The flags specifying behaviour for this field.</param> /// <param name="information">Additional information for this field.</param> /// <param name="value">The text value.</param> /// <param name="maxLength">The maximum length.</param> /// <param name="pageNumber">The number of the page this field appears on.</param> /// <param name="bounds">The location of this field on the page.</param> public AcroTextField(DictionaryToken dictionary, string fieldType, AcroTextFieldFlags fieldFlags, AcroFieldCommonInformation information, string value, int?maxLength, int?pageNumber, PdfRectangle?bounds) : base(dictionary, fieldType, (uint)fieldFlags, AcroFieldType.Text, information, pageNumber, bounds) { Flags = fieldFlags; Value = value; MaxLength = maxLength; IsRichText = Flags.HasFlag(AcroTextFieldFlags.RichText); IsMultiline = Flags.HasFlag(AcroTextFieldFlags.Multiline); }
/// <summary> /// Create a new <see cref="AcroFieldBase"/>. /// </summary> /// <param name="dictionary">The dictionary for this field.</param> /// <param name="rawFieldType">The PDF string type of this field.</param> /// <param name="fieldFlags">The flags specifying behaviour for this field.</param> /// <param name="fieldType">The type of this field.</param> /// <param name="information">Additional information for this field.</param> /// <param name="pageNumber">The number of the page this field appears on.</param> /// <param name="bounds">The location of this field on the page.</param> protected AcroFieldBase(DictionaryToken dictionary, string rawFieldType, uint fieldFlags, AcroFieldType fieldType, AcroFieldCommonInformation information, int?pageNumber, PdfRectangle?bounds) { Dictionary = dictionary ?? throw new ArgumentNullException(nameof(dictionary)); RawFieldType = rawFieldType ?? throw new ArgumentNullException(nameof(rawFieldType)); FieldFlags = fieldFlags; FieldType = fieldType; Information = information ?? new AcroFieldCommonInformation(null, null, null, null); PageNumber = pageNumber; Bounds = bounds; }
/// <inheritdoc /> /// <summary> /// Create a new <see cref="AcroListBoxField"/>. /// </summary> /// <param name="dictionary">The dictionary for this field.</param> /// <param name="fieldType">The type of this field, must be <see cref="NameToken.Ch"/>.</param> /// <param name="fieldFlags">The flags specifying behaviour for this field.</param> /// <param name="information">Additional information for this field.</param> /// <param name="options">The options in this field.</param> /// <param name="selectedOptionIndices">The indices of the selected options where there are multiple with the same name.</param> /// <param name="topIndex">The first visible option index.</param> /// <param name="selectedOptions">The names of the selected options.</param> /// <param name="pageNumber">The number of the page this field appears on.</param> /// <param name="bounds">The location of this field on the page.</param> public AcroListBoxField(DictionaryToken dictionary, string fieldType, AcroChoiceFieldFlags fieldFlags, AcroFieldCommonInformation information, IReadOnlyList <AcroChoiceOption> options, IReadOnlyList <string> selectedOptions, IReadOnlyList <int> selectedOptionIndices, int?topIndex, int?pageNumber, PdfRectangle?bounds) : base(dictionary, fieldType, (uint)fieldFlags, AcroFieldType.ListBox, information, pageNumber, bounds) { Flags = fieldFlags; Options = options ?? throw new ArgumentNullException(nameof(options)); SelectedOptions = selectedOptions ?? throw new ArgumentNullException(nameof(selectedOptions)); SelectedOptionIndices = selectedOptionIndices; TopIndex = topIndex ?? 0; }
public AcroRadioButtonsField(DictionaryToken dictionary, string fieldType, AcroButtonFieldFlags fieldFlags, AcroFieldCommonInformation information) : base(dictionary, fieldType, (uint)fieldFlags, information) { Flags = fieldFlags; }
public AcroSignatureField(DictionaryToken dictionary, string fieldType, uint fieldFlags, AcroFieldCommonInformation information) : base(dictionary, fieldType, fieldFlags, information) { }