Table of Contents

Method TryGetControl

Namespace
BitMiracle.Docotic.Pdf
Assembly
BitMiracle.Docotic.Pdf.dll

TryGetControl(string, out PdfControl?)

Attempts to retrieve a PdfControl by its name.

public bool TryGetControl(string name, out PdfControl? control)

Parameters

name string

The name of the control to find.

control PdfControl

When this method returns, contains the PdfControl instance if found; otherwise, null.

Returns

bool

true if the control was successfully found; otherwise, false.

Remarks

This method performs the search using the values of the FullName and Name properties.

This method performs a search through the collection of document controls. Because the collection does not support random access, the method may be slow, as it checks up to all elements sequentially.

This method does not throw an exception if the control is not found. Instead, it returns false and outputs a null control reference.

You can use this method to fill in a PDF form.

Exceptions

ArgumentNullException

name is null.