IRONPDFDEMOS
Stamper / Watermark
PDF Preview
Loading PDF preview...
C# Code Example
C# Code
1using IronPdf;2using IronPdf.Editing;3using IronPdf.Rendering;4using IronSoftware.Drawing;56using var pdf = PdfDocument.FromFile(@"stamper-watermark-sample.pdf");78var stamper = new TextStamper(@"CONFIDENTIAL", 10000)9{10 HorizontalAlignment = HorizontalAlignment.Center,11 VerticalAlignment = VerticalAlignment.Middle,12 HorizontalOffset = new Length(0, MeasurementUnit.Percentage),13 VerticalOffset = new Length(0, MeasurementUnit.Percentage),14 Opacity = 35,15 Rotation = -45,16 Scale = 100,17 IsStampBehindContent = false,18 IsStampAnnotation = false,19 FontFamily = @"Arial",20 FontSize = 60,21 Color = Color.FromArgb(224, 26, 89),22 BackgroundColor = Color.Transparent,23 IsBold = true,24 IsItalic = false,25 IsUnderline = false,26 IsStrikethrough = false,27 UseGoogleFont = false,28};2930pdf.ApplyStamp(stamper);3132pdf.SaveAs(@"stamper-watermark-text.pdf");
Options