import { ObjectManager } from "../../ObjectManager"; import { MarkupAnnotation, type MarkupAnnotationProperties } from "./MarkupAnnotation"; import { type Font } from "../../Font"; /** * Defines properties of a {@link StampAnnotation}. */ export type StampAnnotationProperties = MarkupAnnotationProperties & { type: "stamp"; /** * A string specifying the name of an icon used to display the annotation. * The PDF specification provides a predefined set of icons: * "Approved", "AsIs", "Confidential", "Departmental", "Draft", "Experimental", "Expired", * "Final", "ForComment", "ForPublicRelease", "NotApproved", "NotForPublicRelease", * "Sold", "TopSecret". * * In practice though this entry often contains names of custom icons specific to the application that created the document. */ icon?: string; /** * A font to draw the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ font?: Font; /** * A value indicating whether to show {@link MarkupAnnotation#userName} on the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ showUserName?: boolean; /** * A value indicating whether to show {@link MarkupAnnotation#creationDate} on the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ showCreationDate?: boolean; /** * The border width. */ borderWidth?: number; }; /** * Represents an annotation that displays text or graphics * intended to look as if they were stamped on the page with a rubber stamp. */ export declare class StampAnnotation extends MarkupAnnotation { /** * Creates a new {@link StampAnnotation}. * * @param om - {@link ObjectManager} that controls the lifetime of the {@link StampAnnotation}. */ constructor(om: ObjectManager); /** * Creates a new {@link StampAnnotation}. */ constructor(); /** * Gets or sets a string specifying the name of an icon used to display the annotation. * The PDF specification provides a predefined set of icons: * "Approved", "AsIs", "Confidential", "Departmental", "Draft", "Experimental", "Expired", * "Final", "ForComment", "ForPublicRelease", "NotApproved", "NotForPublicRelease", * "Sold", "TopSecret". * * In practice though this entry often contains names of custom icons specific to the application that created the document. */ get icon(): string; /** * Gets or sets a string specifying the name of an icon used to display the annotation. * The PDF specification provides a predefined set of icons: * "Approved", "AsIs", "Confidential", "Departmental", "Draft", "Experimental", "Expired", * "Final", "ForComment", "ForPublicRelease", "NotApproved", "NotForPublicRelease", * "Sold", "TopSecret". * * In practice though this entry often contains names of custom icons specific to the application that created the document. */ set icon(value: string | null); /** * Gets or sets a font to draw the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ get font(): Font | null; /** * Gets or sets a font to draw the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ set font(value: Font | null); /** * Gets or sets a value indicating whether to show {@link MarkupAnnotation#userName} on the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ get showUserName(): boolean; /** * Gets or sets a value indicating whether to show {@link MarkupAnnotation#userName} on the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ set showUserName(value: boolean); /** * Gets or sets a value indicating whether to show {@link MarkupAnnotation#creationDate} on the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ get showCreationDate(): boolean; /** * Gets or sets a value indicating whether to show {@link MarkupAnnotation#creationDate} on the stamp. * Note: This property is not persisted in the document and is used * when the annotation's appearance is generated. */ set showCreationDate(value: boolean); /** * Gets or sets the border width. */ get borderWidth(): number; /** * Gets or sets the border width. */ set borderWidth(value: number); /** * Rotates the annotation content by the specified angle. * Positive values indicate counterclockwise rotation. * Note that the annotation must be added to a document before calling this method. * @param angleDegrees - The rotation angle in degrees. */ rotateContent(angleDegrees: number): void; }