WatermarkStamp

WatermarkStamp

Overview

WatermarkStamp is a class in Aspose.PDF FOSS for .NET. Inherits from: Stamp.

A watermark stamp that draws diagonal text across the page.

This class provides 7 methods for working with WatermarkStamp objects in .NET programs. Available methods include: BindImage, BindLogo, BindPdf, BindTextState, SetImageSize, SetOrigin, WatermarkStamp. All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package. Properties: BlendingSpace, Color, FontName, FontSize, IsBackground, Opacity, and 9 more.

Properties

NameTypeAccessDescription
TextstringRead/WriteThe watermark text.
FontNamestringRead/WriteFont name.
FontSizedoubleRead/WriteFont size in points.
Color(double R, double G, double B)Read/WriteText color as RGB (0-1 range).
RotatedoubleRead/WriteRotation angle in degrees.
StampIdintRead/WriteThe stamp identifier.
Pagesint[]?Read/WritePages to apply the stamp to (1-based).
PageNumberintRead/WriteSingle page number to apply the stamp to (1-based).
XOrigindoubleRead/WriteX origin position in points.
YOrigindoubleRead/WriteY origin position in points.
RotationfloatRead/WriteRotation angle in degrees.
OpacityfloatRead/WriteOpacity (0.0-1.0).
IsBackgroundboolRead/WriteWhether this stamp is in the background.
QualityintRead/WriteJPEG quality (1..100) when the stamp is emitted as a JPEG image.
BlendingSpaceBlendingColorSpaceRead/WriteBlending colour space used when compositing the stamp onto the page.

Methods

SignatureDescription
WatermarkStamp(text: string)Calls WatermarkStamp on this WatermarkStamp instance.
BindLogo(formattedText: FormattedText)Bind a FormattedText as the stamp’s logo (text stamp).
BindImage(imageData: byte[])Bind raw image bytes as the stamp’s logo (image stamp).
BindPdf(pdfStream: Stream, pageNumber: int)Bind a PDF page (as the stamp source) by stream + 1-based page number.
BindTextState(textState: TextState)Bind a TextState that overrides defaults when the stamp is text-typed.
SetImageSize(width: float, height: float)Set the explicit pixel size at which the image stamp is rendered.
SetOrigin(originX: float, originY: float)Set the origin position.

See Also