---
Product: Aspose.PDF
Platform: go
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/go/stampannotation
---

# StampAnnotation

## Overview

`StampAnnotation` is a type in Aspose.PDF FOSS for Go.
Inherits from: `drawingAnnotationBase`.

StampAnnotation is a rubber-stamp annotation.

This type declares 10 methods for StampAnnotation objects in Go programs.
Available methods include: `AnnotationType`, `ClearCustomImage`, `HasCustomImage`, `Name`, `RawName`, `RegenerateAppearance`, `SetCustomImage`, `SetCustomImageFromStream`, `SetName`, `SetRawName`.
Public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.

## Methods

| Signature | Description |
|-----------|-------------|
| `AnnotationType()` → `AnnotationType` | Returns the annotation type. |
| `Name()` → `StampName` | Name returns the StampName decoded from /Name. |
| `SetName(n: StampName)` | SetName writes the /Name entry from a typed StampName. |
| `RawName()` → `string` | RawName returns the /Name entry as a raw string ("/Approved", custom). |
| `SetRawName(s: string)` | SetRawName writes the /Name entry from a raw string. |
| `HasCustomImage()` → `bool` | HasCustomImage returns true if SetCustomImage / SetCustomImageFromStream has been called and not subsequently cleared. |
| `RegenerateAppearance()` | RegenerateAppearance forces /AP/N to be rebuilt from current state. |
| `SetCustomImage(path: string)` → `error` | SetCustomImage embeds the image at path as the stamp's /AP/N visual, overriding the predefined-name template. |
| `SetCustomImageFromStream(r: io.Reader)` → `error` | SetCustomImageFromStream is the io.Reader variant of SetCustomImage. |
| `ClearCustomImage()` | ClearCustomImage reverts /AP/N to the predefined-name template visual. |

## See Also

- [Aspose.PDF — Enterprise API Reference](https://reference.aspose.com/pdf/)