Class AbstractFormFieldRenderer
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
Methods
AdjustFieldLayout(LayoutContext)
Adjusts the field layout.
protected abstract void AdjustFieldLayout(LayoutContext layoutContext)
Parameters
layoutContext
LayoutContextlayout context
ApplyAccessibilityProperties(PdfFormField, PdfDocument)
Applies the accessibility properties to the form field.
protected virtual void ApplyAccessibilityProperties(PdfFormField formField, PdfDocument pdfDocument)
Parameters
formField
PdfFormFieldThe form field to which the accessibility properties should be applied.
pdfDocument
PdfDocumentThe document to which the form field belongs.
ApplyAcroField(DrawContext)
Applies the AcroField widget.
protected abstract void ApplyAcroField(DrawContext drawContext)
Parameters
drawContext
DrawContextthe 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
PdfDocumentthe 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
PdfDocumentthe 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
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
IsRendererFit(float, float)
Checks if the renderer fits a certain width and height.
protected virtual bool IsRendererFit(float availableWidth, float availableHeight)
Parameters
Returns
- bool
true, if the renderer fits.
Layout(LayoutContext)
public override LayoutResult Layout(LayoutContext layoutContext)
Parameters
layoutContext
LayoutContext
Returns
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
PdfDocumentthe document which contains form field