Skip to content

Commit 57d1143

Browse files
880343: Add proper bounds value.
1 parent e4460f1 commit 57d1143

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

File-Formats/PDF/Working-with-Watermarks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
389389
PdfLoadedPage lpage = loadedDocument.Pages[0] as PdfLoadedPage;
390390

391391
//Creates PDF watermark annotation
392-
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(0, 0, 200, 50));
392+
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(100, 100, 200, 50));
393393
//Sets properties to the annotation
394394
watermark.Opacity = 0.5f;
395395
//Create the appearance of watermark
@@ -413,7 +413,7 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
413413
PdfLoadedPage lpage = loadedDocument.Pages[0] as PdfLoadedPage;
414414

415415
//Creates PDF watermark annotation
416-
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(0, 0, 200, 50));
416+
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(100, 100, 200, 50));
417417
//Sets properties to the annotation
418418
watermark.Opacity = 0.5f;
419419
//Create the appearance of watermark
@@ -435,7 +435,7 @@ loadedDocument.Close(true);
435435
Dim lpage As PdfLoadedPage = TryCast(loadedDocument.Pages(0),PdfLoadedPage)
436436

437437
'Creates PDF watermark annotation
438-
Dim watermark As New PdfWatermarkAnnotation(New RectangleF(0, 0, 200, 50))
438+
Dim watermark As New PdfWatermarkAnnotation(New RectangleF(100, 100, 200, 50))
439439
watermark.Opacity = 0.5f;
440440
'Creates the appearance of watermark
441441
watermark.Appearance.Normal.Graphics.DrawString("Watermark Text", New PdfStandardFont(PdfFontFamily.Helvetica, 20), PdfBrushes.Red, New RectangleF(0, 0, 200, 50), New PdfStringFormat(PdfTextAlignment.Center, PdfVerticalAlignment.Middle))

0 commit comments

Comments
 (0)