You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: File-Formats/PDF/Working-with-Watermarks.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -389,7 +389,7 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream);
389
389
PdfLoadedPage lpage = loadedDocument.Pages[0] as PdfLoadedPage;
390
390
391
391
//Creates PDF watermark annotation
392
-
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(50, 100, 100, 50));
392
+
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(0, 0, 200, 50));
393
393
//Sets properties to the annotation
394
394
watermark.Opacity = 0.5f;
395
395
//Create the appearance of watermark
@@ -413,7 +413,7 @@ PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");
413
413
PdfLoadedPage lpage = loadedDocument.Pages[0] as PdfLoadedPage;
414
414
415
415
//Creates PDF watermark annotation
416
-
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(50, 100, 100, 50));
416
+
PdfWatermarkAnnotation watermark = new PdfWatermarkAnnotation(new RectangleF(0, 0, 200, 50));
417
417
//Sets properties to the annotation
418
418
watermark.Opacity = 0.5f;
419
419
//Create the appearance of watermark
@@ -435,7 +435,7 @@ loadedDocument.Close(true);
435
435
Dim lpage As PdfLoadedPage = TryCast(loadedDocument.Pages(0),PdfLoadedPage)
436
436
437
437
'Creates PDF watermark annotation
438
-
Dim watermark As New PdfWatermarkAnnotation(New RectangleF(50, 100, 100, 50))
438
+
Dim watermark As New PdfWatermarkAnnotation(New RectangleF(0, 0, 200, 50))
439
439
watermark.Opacity = 0.5f;
440
440
'Creates the appearance of watermark
441
441
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