Table of Contents

Class AbstractFormFieldRenderer

Namespace
iText.Forms.Form.Renderer
Assembly
itext.forms.dll

Abstract BlockRenderer for form fields.

public abstract class AbstractFormFieldRenderer : BlockRenderer, IRenderer, IPropertyContainer
Inheritance
AbstractFormFieldRenderer
Implements
Derived
Inherited Members

Fields

flatRenderer

The flat renderer.

protected IRenderer flatRenderer

Field Value

IRenderer

Methods

AdjustFieldLayout(LayoutContext)

Adjusts the field layout.

protected abstract void AdjustFieldLayout(LayoutContext layoutContext)

Parameters

layoutContext LayoutContext

layout context

ApplyAccessibilityProperties(PdfFormField, PdfDocument)

Applies the accessibility properties to the form field.

protected virtual void ApplyAccessibilityProperties(PdfFormField formField, PdfDocument pdfDocument)

Parameters

formField PdfFormField

The form field to which the accessibility properties should be applied.

pdfDocument PdfDocument

The document to which the form field belongs.

ApplyAcroField(DrawContext)

Applies the AcroField widget.

protected abstract void ApplyAcroField(DrawContext drawContext)

Parameters

drawContext DrawContext

the draw context

CreateFlatRenderer()

Creates the flat renderer instance.

protected abstract IRenderer CreateFlatRenderer()

Returns

IRenderer

the renderer instance.

Draw(DrawContext)

public override void Draw(DrawContext drawContext)

Parameters

drawContext DrawContext

DrawChildren(DrawContext)

public override void DrawChildren(DrawContext drawContext)

Parameters

drawContext DrawContext

GetConformanceLevel(PdfDocument)

Gets the conformance level.

[Obsolete("since 8.0.4 will return iText.Kernel.Pdf.IConformanceLevel")]
protected virtual PdfAConformanceLevel GetConformanceLevel(PdfDocument document)

Parameters

document PdfDocument

the document

Returns

PdfAConformanceLevel

the conformance level or null if the conformance level is not set.

Remarks

Gets the conformance level. If the conformance level is not set, the conformance level of the document is used.

GetDefaultValue()

Gets the default value of the form field.

public virtual string GetDefaultValue()

Returns

string

the default value of the form field.

GetGenericConformanceLevel(PdfDocument)

Gets the conformance level.

[Obsolete("since 8.0.4 will be renamed to getConformanceLevel()")]
protected virtual IConformanceLevel GetGenericConformanceLevel(PdfDocument document)

Parameters

document PdfDocument

the document

Returns

IConformanceLevel

the conformance level or null if the conformance level is not set.

Remarks

Gets the conformance level. If the conformance level is not set, the conformance level of the document is used.

GetLang()

Gets the accessibility language.

[Obsolete("use iText.Layout.Tagging.IAccessibleElement.GetAccessibilityProperties() instead")]
protected virtual string GetLang()

Returns

string

the accessibility language.

GetMinMaxWidth()

public override MinMaxWidth GetMinMaxWidth()

Returns

MinMaxWidth

GetModelId()

Gets the model id.

protected virtual string GetModelId()

Returns

string

the model id.

IsFlatten()

Checks if form fields need to be flattened.

public virtual bool IsFlatten()

Returns

bool

true, if fields need to be flattened.

IsLayoutBasedOnFlatRenderer()

Determines, whether the layout is based in the renderer itself or flat renderer.

protected virtual bool IsLayoutBasedOnFlatRenderer()

Returns

bool

true if layout is based on flat renderer, false otherwise.

IsRendererFit(float, float)

Checks if the renderer fits a certain width and height.

protected virtual bool IsRendererFit(float availableWidth, float availableHeight)

Parameters

availableWidth float

the available width

availableHeight float

the available height

Returns

bool

true, if the renderer fits.

Layout(LayoutContext)

public override LayoutResult Layout(LayoutContext layoutContext)

Parameters

layoutContext LayoutContext

Returns

LayoutResult

WriteAcroFormFieldLangAttribute(PdfDocument)

Sets the form accessibility language identifier of the form element in case the document is tagged.

protected virtual void WriteAcroFormFieldLangAttribute(PdfDocument pdfDoc)

Parameters

pdfDoc PdfDocument

the document which contains form field