GemBox.Pdf
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    PdfInteractiveForm Class

    Namespace:
    GemBox.Pdf.Forms
    Assembly:
    GemBox.Pdf.dll

    An interactive form (PDF 1.2)—sometimes referred to as an AcroForm—is a collection of fields for gathering information interactively from the user. A PDF document may contain any number of fields appearing on any combination of pages, all of which make up a single, global interactive form spanning the entire document.

    • C#
    • VB.NET
    public sealed class PdfInteractiveForm : PdfObject
    Public NotInheritable Class PdfInteractiveForm
        Inherits PdfObject
    Inheritance:
    System.Object
    PdfObject
    PdfInteractiveForm

    Properties

    Fields

    Gets the fields.

    • C#
    • VB.NET
    public PdfFieldCollection Fields { get; }
    Public ReadOnly Property Fields As PdfFieldCollection
    Property Value
    PdfFieldCollection

    The fields.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.2 Interactive Form Dictionary'

    NeedAppearances

    (Optional; deprecated in PDF 2.0) A flag specifying whether to construct appearance streams and appearance dictionaries for all widget annotations in the document (see 12.7.3.3, "Variable text").

    Default value: false.

    • C#
    • VB.NET
    public bool NeedAppearances { get; set; }
    Public Property NeedAppearances As Boolean
    Property Value
    System.Boolean

    A flag specifying whether to construct appearance streams and appearance dictionaries for all widget annotations in the document.

    Remarks

    A PDF writer shall include this key, with a value of true, if it has not provided appearance streams for all visible widget annotations present in the document.

    note

    Appearance streams are required in PDF 2.0.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.2 Interactive Form Dictionary'

    Methods

    ExportData(Stream, PdfFormDataFormat)

    Exports the interactive form data from the current PdfInteractiveForm to the specified FDF or XFDF stream.

    • C#
    • VB.NET
    public void ExportData(Stream stream, PdfFormDataFormat format)
    Public Sub ExportData(stream As Stream, format As PdfFormDataFormat)
    Parameters
    stream
    System.IO.Stream

    The FDF or XFDF stream to which to export the interactive form data.

    format
    PdfFormDataFormat

    The format in which interactive form data is exported (either FDF or XFDF).

    Exceptions
    System.ArgumentNullException

    stream is null.

    System.ArgumentException

    PDF interactive form can be exported to either FDF or XFDF file format.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.7 Forms Data Format'

    ExportData(String)

    Exports the interactive form data from the current PdfInteractiveForm to an FDF or XFDF file with the specified path.

    • C#
    • VB.NET
    public void ExportData(string path)
    Public Sub ExportData(path As String)
    Parameters
    path
    System.String

    The path to an FDF or XFDF file to which to export the interactive form data.

    Remarks

    Following file extensions are supported:

    • Forms Data Format: .fdf
    • XML Forms Data Format: .xfdf
    Exceptions
    System.ArgumentNullException

    path is null.

    System.ArgumentException

    If file extension is not specified or not supported.

    See Also
    PDF Specification ISO 32000-1:2008, section '12.7.7 Forms Data Format'

    Inherited Properties

    Metadata

    (Optional; PDF 1.4) A metadata stream containing metadata for the component.

    (Inherited from PdfObject)

    Extension Methods

    PdfObjectExtensions.GetDictionary(PdfObject)
    PdfObjectExtensions.GetOrAddDictionary(PdfObject)
    PdfObjectExtensions.GetArray(PdfObject)

    Examples

    Read Form example
    Export Form example

    See Also

    PDF Specification ISO 32000-1:2008, section '12.7 Interactive Forms'
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.