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

    Show / Hide Table of Contents

    ComHelper Class

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

    Contains methods that can be useful for users which are calling GemBox.Pdf component using COM interop.

    • C#
    • VB.NET
    [ComVisible(true)]
    public class ComHelper
    <ComVisible(True)>
    Inheritance:
    System.Object
    ComHelper

    Constructors

    ComHelper()

    Initializes a new instance of the ComHelper class.

    • C#
    • VB.NET
    public ComHelper()
    Public Sub New

    Methods

    GetFormFields(Object)

    Gets all fields from the PDF document's interactive form.

    • C#
    • VB.NET
    public ArrayList GetFormFields(object document)
    Public Function GetFormFields(document As Object) As ArrayList
    Parameters
    document
    System.Object

    The PdfDocument instance from which to retrieve the PdfField elements.

    Returns
    System.Collections.ArrayList

    Array of interactive form fields.

    Load(String)

    Loads a PDF document from a file with the specified path and with the Default options.

    • C#
    • VB.NET
    public PdfDocument Load(string path)
    Public Function Load(path As String) As PdfDocument
    Parameters
    path
    System.String

    The path to a file from which to load a PDF document.

    Returns
    PdfDocument

    A loaded PDF document.

    Exceptions
    System.ArgumentNullException

    path is null.

    InvalidPdfPasswordException

    PDF file is encrypted and the password is required to load a PDF document. Use LoadWithOptions(String, Object) method and provide a valid Password.

    LoadWithOptions(String, Object)

    Loads a PDF document from a file with the specified path and with the specified options.

    • C#
    • VB.NET
    public PdfDocument LoadWithOptions(string path, object options)
    Public Function LoadWithOptions(path As String, options As Object) As PdfDocument
    Parameters
    path
    System.String

    The path to a file from which to load a PDF document.

    options
    System.Object

    The options used for loading a PdfDocument from a PDF file.

    Returns
    PdfDocument

    A loaded PDF document.

    Exceptions
    System.ArgumentNullException

    path is null or options is null.

    InvalidPdfPasswordException

    PDF file is encrypted and the Password is invalid.

    Save(Object, String)

    Saves the entire PDF document to a file with the specified path.

    Use SaveOptions to specify options used for saving the PdfDocument to a PDF file.

    • C#
    • VB.NET
    public void Save(object document, string path)
    Public Sub Save(document As Object, path As String)
    Parameters
    document
    System.Object

    The PdfDocument instance which to save.

    path
    System.String

    The path to a file to which to save a PDF document.

    Exceptions
    System.ArgumentNullException

    path is null.

    SetLicense(String)

    Sets the license (serial) key.

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

    The serial key.

    Remarks

    You should call this method before using any other class from GemBox.Pdf assembly.

    Key can only be set once (if you try to set another key, exception will be thrown).

    The best place to call this method is from static constructor of your application's main class.

    Valid serial key has multiple groups of alphanumeric characters, separated with dashes.

    To use the assembly in free limited mode, use FREE-LIMITED-KEY as serialKey.

    For more information about GemBox.Pdf evaluation and licensing, see evaluation and licensing.

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.