FreeTextAnnotation

FreeTextAnnotation

Overview

FreeTextAnnotation is a type in Aspose.PDF FOSS for Go.

FreeTextAnnotation displays text directly on the page, rendered into /AP/N using an embedded font.

This type provides 18 methods for working with FreeTextAnnotation objects in Go programs. Available methods include: AnnotationType, BorderEffect, BorderEffectIntensity, CalloutPoints, Contents, EndLineEnding, InnerRect, Intent, RegenerateAppearance, SetBorderEffect, SetBorderEffectIntensity, SetCalloutPoints, and 6 additional methods. All public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.

Methods

SignatureDescription
AnnotationType()AnnotationTypeReturns the annotation type.
Contents()stringContents returns the /Contents text body.
SetContents(s: string)SetContents writes /Contents and regenerates /AP/N (the rendered text content depends on Contents).
TextStyle()TextStyleTextStyle returns the text style reconstructed from /DA + /Q + /BG.
SetTextStyle(s: TextStyle)SetTextStyle writes the style as /DA + /Q + /BG and regenerates /AP/N.
Intent()FreeTextIntentIntent returns the /IT entry mapped to a FreeTextIntent.
SetIntent(i: FreeTextIntent)SetIntent writes the /IT entry.
RegenerateAppearance()RegenerateAppearance forces /AP/N to be rebuilt from current state.
CalloutPoints()[]PointCalloutPoints returns the /CL knee + endpoint points (page space).
SetCalloutPoints(pts: []Point)SetCalloutPoints writes /CL (must be 2 or 3 points; otherwise the call is a no-op).
EndLineEnding()LineEndingStyleEndLineEnding returns the /LE entry as a LineEndingStyle.
SetEndLineEnding(s: LineEndingStyle)SetEndLineEnding writes /LE for the callout endpoint shape.
InnerRect()RectangleInnerRect returns the inner text rectangle derived from /RD entry.
SetInnerRect(inner: Rectangle)SetInnerRect writes /RD computed from the difference between the outer /Rect and the supplied inner rect (page-space).
BorderEffect()BorderEffectBorderEffect returns the /BE/S entry as a BorderEffect.
SetBorderEffect(e: BorderEffect)SetBorderEffect writes /BE/S.
BorderEffectIntensity()float64BorderEffectIntensity returns the /BE/I entry.
SetBorderEffectIntensity(i: float64)SetBorderEffectIntensity writes /BE/I (cloud intensity, typically 0-2).

See Also