Class Widget
Widget annotations are part of PDF forms and used to position form elements, linked to form field, on a page. How a widget is rendered depends on the linked form field. Widget annotations are currently read only.
Implements
Inherited Members
Namespace: PSPDFKit.Sdk.Models.Annotation
Assembly: Sdk.dll
Syntax
public sealed class Widget : AnnotationBase, IAnnotation
Properties
| Edit this page View SourceBackgroundColor
Optional background Color that will fill the complete bounding box.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(ColorJsonConverter))]
public Color? BackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color? |
BorderColor
Optional border color for widget.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public Color? BorderColor { get; set; }
Property Value
Type | Description |
---|---|
Color? |
BorderDashArray
Optional dash pattern used to draw the shape lines for dashed line style.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public Tuple<int, int> BorderDashArray { get; set; }
Property Value
Type | Description |
---|---|
Tuple<int, int> |
BorderStyle
Optional border style used for rendering the border of the bounding box.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(StringEnumConverter), new object[] { typeof(CamelCaseNamingStrategy) })]
public BorderStyle? BorderStyle { get; set; }
Property Value
Type | Description |
---|---|
BorderStyle? |
BorderWidth
Optional border width in PDF pixels, that will be used for the border of the bounding box.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public float? BorderWidth { get; set; }
Property Value
Type | Description |
---|---|
float? |
FontFamily
The name of the font family that should be used.
Declaration
[JsonProperty("font", NullValueHandling = NullValueHandling.Ignore)]
public string FontFamily { get; set; }
Property Value
Type | Description |
---|---|
string |
FontSize
The font size in page size pixels. Per default, we use values between 10 and 192 inclusive in the UI. The text will scale when you zoom in.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public int? FontSize { get; set; }
Property Value
Type | Description |
---|---|
int? |
ForegroundColor
An optional color for the font.
Declaration
[JsonProperty("fontColor", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(ColorJsonConverter))]
public Color? ForegroundColor { get; set; }
Property Value
Type | Description |
---|---|
Color? |
FormFieldName
The name of the linked form field. Based on the type of the field a different element will be rendered.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public string FormFieldName { get; set; }
Property Value
Type | Description |
---|---|
string |
HorizontalAlign
The horizontal alignment of the text inside the bounding box.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public HorizontalAlign? HorizontalAlign { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAlign? |
IsBold
If true, the font will be bold if the font family supports this.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public bool IsBold { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsItalic
If true, the font will be italic if the font family supports this
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public bool IsItalic { get; set; }
Property Value
Type | Description |
---|---|
bool |
Rotation
The rotation of the annotation. Can either be 0°, 90°, 180°, or 270°.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy))]
public int Rotation { get; set; }
Property Value
Type | Description |
---|---|
int |
VerticalAlign
The vertical alignment of the text inside the bounding box.
Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public VerticalAlign? VerticalAlign { get; set; }
Property Value
Type | Description |
---|---|
VerticalAlign? |