PdfPageFacade.AddRubberStampAnnotation(PdfRectangle, String, Int32) Method
In This Article
Creates a rubber stamp annotation in the specified page rectangle.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v24.2.Core.dll
NuGet Package: DevExpress.Pdf.Core
#Declaration
public PdfRubberStampAnnotationFacade AddRubberStampAnnotation(
PdfRectangle rect,
string pdfFileName,
int pageNumber
)
#Parameters
Name | Type | Description |
---|---|---|
rect | Pdf |
A page area to add the rubber stamp annotation. |
pdf |
String | The name of the document file used to generate a stamp (including the full path). |
page |
Int32 | The number of the document page used to generate a stamp. |
#Returns
Type | Description |
---|---|
Pdf |
An object that contains rubber stamp annotation properties. |
#Example
The code sample below generates a custom stamp from another document:
# [C#](#tab/tabid-csharp)
```csharp
using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
// Load a document
processor.LoadDocument("..\\..\\Document.pdf");
// Access the first page properties
PdfPageFacade page = processor.DocumentFacade.Pages[0];
// Define a a rubber stamp rectangle
PdfRectangle rubberStampRectangle = new PdfRectangle(663, 526, 763, 576);
// Specify a document to use as a custom stamp
string customStampFile = "..\\..\\Demo.pdf";
// Create a rubber stamp annotation
PdfRubberStampAnnotationFacade rubberStamp =
page.AddRubberStampAnnotation(rubberStampRectangle, customStampFile, 2);
rubberStamp.Author = "Jesse Faden";
// Save the result
processor.SaveDocument("..\..\Result.pdf")
}
See Also