# Adding a Watermark to a Printed Page

Learn how to add a watermark to a printed page in your spreadsheet using code examples in C# and VB.

## Content

You can print a background image or a watermark when the spreadsheet is printed.
Set the [PrintBackground](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.FpSpread.PrintBackground.html) event to fire when printing, and specify the graphic with the **PrintBackground** event, and the opacity with the PrintInfo.[Opacity](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.Opacity.html) property, so the printing of the spreadsheet has no watermark if opacity is highest (transparency is lowest) and shows the watermark through the spreadsheet if the opacity is low (transparency is high).

## Using Code

Use the [PrintInfo](/spreadnet/api/latest/online-win/FarPoint.Win.Spread/FarPoint.Win.Spread.PrintInfo.html) object to specify the opacity for printing a watermark.

## Example

This example shows how to print a watermark.

```csharp
private void fpSpread1_PrintBackground(object sender, FarPoint.Win.Spread.PrintBackgroundEventArgs e)
{
    FarPoint.Win.Picture pic = new FarPoint.Win.Picture(System.Drawing.Image.FromFile("D:\\Files\\cover.jpg"), FarPoint.Win.RenderStyle.Normal);
    pic.AlignHorz = FarPoint.Win.HorizontalAlignment.Left;
    pic.AlignVert = FarPoint.Win.VerticalAlignment.Top;
    pic.Paint(e.Graphics, e.SheetRectangle);
}
    

private void button1_Click(object sender, System.EventArgs e)
{
    FarPoint.Win.Spread.PrintInfo pi = new FarPoint.Win.Spread.PrintInfo();
    pi.Opacity = 100;
    fpSpread1.ActiveSheet.PrintInfo = pi;
    fpSpread1.PrintSheet(0);
}
```

```vbnet
Private Sub fpSpread1_PrintBackground(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.PrintBackgroundEventArgs) Handles FpSpread1.PrintBackground
    Dim pic As New FarPoint.Win.Picture(Image.FromFile("D:\Files\cover.jpg"), FarPoint.Win.RenderStyle.Normal)
    pic.AlignHorz = FarPoint.Win.HorizontalAlignment.Left
    pic.AlignVert = FarPoint.Win.VerticalAlignment.Top
    pic.Paint(e.Graphics, e.SheetRectangle)
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    Dim pi As New FarPoint.Win.Spread.PrintInfo()
    pi.Opacity = 100
    fpSpread1.ActiveSheet.PrintInfo = pi
    fpSpread1.PrintSheet(0)
End Sub
```

## See Also

[Understanding the Printing Options](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-printoptions)
[Customizing the Print Job Settings](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-printsettings)
[Customizing the Printed Page Layout](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-printlayout)
[Customizing the Printed Page Header or Footer](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-printheadfoot)
[Customizing the Print Preview Dialog](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/CustomizingthePrintPreviewDialog)
[Repeating Rows or Columns on Printed Pages](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-printrepeatrange)
[Adding a Page Break](/spreadnet/docs/latest/online-win/overview/spwin-devguide/spwin-printing/spwin-printcustomize/spwin-pagebreaks)