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.

Inheritance
Widget
Implements
Namespace: PSPDFKit.Sdk.Models.Annotation
Assembly: Sdk.dll
Syntax
public sealed class Widget : AnnotationBase, IAnnotation

Properties

| Edit this page View Source

BackgroundColor

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?
| Edit this page View Source

BorderColor

Optional border color for widget.

Declaration
[JsonProperty(NamingStrategyType = typeof(CamelCaseNamingStrategy), NullValueHandling = NullValueHandling.Ignore)]
public Color? BorderColor { get; set; }
Property Value
Type Description
Color?
| Edit this page View Source

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>
| Edit this page View Source

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?
| Edit this page View Source

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?
| Edit this page View Source

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
| Edit this page View Source

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?
| Edit this page View Source

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?
| Edit this page View Source

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
| Edit this page View Source

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?
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

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
| Edit this page View Source

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?

Implements

IAnnotation