Table of Contents

Class PdfFormAnnotationUtil

Namespace
iText.Forms.Fields
Assembly
itext.forms.dll

Utility class to work with widget annotations PdfFormAnnotation and its dictionaries.

public sealed class PdfFormAnnotationUtil
Inheritance
PdfFormAnnotationUtil
Inherited Members

Methods

AddWidgetAnnotationToPage(PdfPage, PdfAnnotation)

Add widget annotation to the specified page.

public static void AddWidgetAnnotationToPage(PdfPage page, PdfAnnotation annotation)

Parameters

page PdfPage

to which annotation should be added.

annotation PdfAnnotation

widget annotation to add.

AddWidgetAnnotationToPage(PdfPage, PdfAnnotation, int)

Add widget annotation to the specified page.

public static void AddWidgetAnnotationToPage(PdfPage page, PdfAnnotation annotation, int index)

Parameters

page PdfPage

to which annotation should be added.

annotation PdfAnnotation

widget annotation to add.

index int

the index at which specified annotation will be added. If -1 then annotation will be added to the end of an array.

IsPureWidget(PdfDictionary)

Check that <PdfDictionary> object is pure widget annotation.

public static bool IsPureWidget(PdfDictionary fieldDict)

Parameters

fieldDict PdfDictionary

field dictionary to check.

Returns

bool

true if passed dictionary is a widget, false otherwise.

IsPureWidgetOrMergedField(PdfDictionary)

Check that <PdfDictionary> object is widget annotation or merged field.

public static bool IsPureWidgetOrMergedField(PdfDictionary fieldDict)

Parameters

fieldDict PdfDictionary

field dictionary to check.

Returns

bool

true if passed dictionary is a widget or merged field, false otherwise.

MergeWidgetWithParentField(PdfFormField)

Merge single widget annotation with its parent field.

public static void MergeWidgetWithParentField(PdfFormField field)

Parameters

field PdfFormField

parent field.

SeparateWidgetAndField(PdfFormField)

Separate merged field to form field and pure widget annotation.

public static void SeparateWidgetAndField(PdfFormField field)

Parameters

field PdfFormField

to separate.

Remarks

Separate merged field to form field and pure widget annotation. Do nothing if the incoming field is not merged field.