import { ObjectBase } from "../../ObjectBase"; import type { Font } from "../../Font"; import type { Color } from "../../Types"; /** * Defines the default appearance of an annotation. */ export type DefaultAppearanceProperties = { /** * The {@link Font} object. * * @see {@link DefaultAppearance#font} */ font?: Font; /** * The font size in points. * * @see {@link DefaultAppearance#fontSize} */ fontSize?: number; /** * The foreground color. * * @see {@link DefaultAppearance#foreColor} */ foreColor?: Color; }; /** * Represents the default appearance of an annotation. **/ export declare class DefaultAppearance extends ObjectBase { /** * Gets or sets the text representing the appearance as it will be stored in a PDF stream * (e.g. "/DF0 10 Tf 0 0 0 rg"). * * Please see the PDF specification for details. */ get text(): string | null; /** * Gets or sets the text representing the appearance as it will be stored in a PDF stream * (e.g. "/DF0 10 Tf 0 0 0 rg"). * * Please see the PDF specification for details. */ set text(value: string | null); /** * Gets or sets the {@link Font} object. * * In a newly created document the value of this property is null. * If the value has not been set when the document is saved * (and for fields, the owner field has been added to {@link PdfDocument}), * a default value is automatically assigned depending on the type * of the current object's owner: * * 1. {@link TextField}, {@link ComboBoxField}, {@link CombTextField}, {@link ListBoxField}, {@link PushButtonField} * The default font is Helvetica, 9pt, Black. * 2. {@link CheckBoxField}, {@link RadioButtonField} * The default font is ZapfDingbats, 0 (meaning auto-size), Black. * (Note that for these field types ZapfDingbats will always be used regardless of the current setting.) * 3. {@link RedactAnnotation}, {@link FreeTextAnnotation} * The default font is Helvetica, 9pt, Black. * * When setting this property, you may use {@link FontCollection#searchFont} * or other {@link FontCollection} methods to find a suitable font. */ get font(): Font | null; /** * Gets or sets the {@link Font} object. * * In a newly created document the value of this property is null. * If the value has not been set when the document is saved * (and for fields, the owner field has been added to {@link PdfDocument}), * a default value is automatically assigned depending on the type * of the current object's owner: * * 1. {@link TextField}, {@link ComboBoxField}, {@link CombTextField}, {@link ListBoxField}, {@link PushButtonField} * The default font is Helvetica, 9pt, Black. * 2. {@link CheckBoxField}, {@link RadioButtonField} * The default font is ZapfDingbats, 0 (meaning auto-size), Black. * (Note that for these field types ZapfDingbats will always be used regardless of the current setting.) * 3. {@link RedactAnnotation}, {@link FreeTextAnnotation} * The default font is Helvetica, 9pt, Black. * * When setting this property, you may use {@link FontCollection#searchFont} * or other {@link FontCollection} methods to find a suitable font. */ set font(value: Font | null); /** * Gets or sets the font size in points. * * In a newly created document the value of this property is null. * If the value has not been set when the document is saved * (and for fields, the owner field has been added to {@link PdfDocument}), * a default value is automatically assigned depending on the type * of the current object's owner: * * 1. {@link TextField}, {@link ComboBoxField}, {@link CombTextField}, {@link ListBoxField}, {@link PushButtonField} * The default font is Helvetica, 9pt, Black. * 2. {@link CheckBoxField}, {@link RadioButtonField} * The default font is ZapfDingbats, 0 (meaning auto-size), Black. * (Note that for these field types ZapfDingbats will always be used regardless of the current setting.) * 3. {@link RedactAnnotation}, {@link FreeTextAnnotation} * The default font is Helvetica, 9pt, Black. */ get fontSize(): number | null; /** * Gets or sets the font size in points. * * In a newly created document the value of this property is null. * If the value has not been set when the document is saved * (and for fields, the owner field has been added to {@link PdfDocument}), * a default value is automatically assigned depending on the type * of the current object's owner: * * 1. {@link TextField}, {@link ComboBoxField}, {@link CombTextField}, {@link ListBoxField}, {@link PushButtonField} * The default font is Helvetica, 9pt, Black. * 2. {@link CheckBoxField}, {@link RadioButtonField} * The default font is ZapfDingbats, 0 (meaning auto-size), Black. * (Note that for these field types ZapfDingbats will always be used regardless of the current setting.) * 3. {@link RedactAnnotation}, {@link FreeTextAnnotation} * The default font is Helvetica, 9pt, Black. */ set fontSize(value: number | null); /** * Gets or sets the foreground color. * * In a newly created document the value of this property is null. * If the value has not been set when the document is saved * (and for fields, the owner field has been added to {@link PdfDocument}), * a default value is automatically assigned depending on the type * of the current object's owner: * * 1. {@link TextField}, {@link ComboBoxField}, {@link CombTextField}, {@link ListBoxField}, {@link PushButtonField} * The default font is Helvetica, 9pt, Black. * 2. {@link CheckBoxField}, {@link RadioButtonField} * The default font is ZapfDingbats, 0 (meaning auto-size), Black. * (Note that for these field types ZapfDingbats will always be used regardless of the current setting.) * 3. {@link RedactAnnotation}, {@link FreeTextAnnotation} * The default font is Helvetica, 9pt, Black. */ get foreColor(): Color | null; /** * Gets or sets the foreground color. * * In a newly created document the value of this property is null. * If the value has not been set when the document is saved * (and for fields, the owner field has been added to {@link PdfDocument}), * a default value is automatically assigned depending on the type * of the current object's owner: * * 1. {@link TextField}, {@link ComboBoxField}, {@link CombTextField}, {@link ListBoxField}, {@link PushButtonField} * The default font is Helvetica, 9pt, Black. * 2. {@link CheckBoxField}, {@link RadioButtonField} * The default font is ZapfDingbats, 0 (meaning auto-size), Black. * (Note that for these field types ZapfDingbats will always be used regardless of the current setting.) * 3. {@link RedactAnnotation}, {@link FreeTextAnnotation} * The default font is Helvetica, 9pt, Black. */ set foreColor(value: Color | null); }