Table of Contents

Class PdfMask

Namespace
Syncfusion.Pdf.Graphics
Assembly
Syncfusion.Pdf.Portable.dll

Base class for bitmap masking objects.

public abstract class PdfMask
Inheritance
PdfMask
Derived
Inherited Members

Examples

//Create a PDF document
 PdfDocument doc = new PdfDocument();
 //Add pages to the document
 PdfPage page = doc.Pages.Add();
 //Create PDF graphics for the page
 PdfGraphics graphics = page.Graphics;
 //Load the Tiff image
 PdfBitmap image = new PdfBitmap("image.tif");
 //Create masking image
 PdfMask mask = new PdfImageMask(new PdfBitmap("mask.bmp"));
 image.Mask = mask;
 //Draw the image
 graphics.DrawImage(image, 0, 0);
 //Saves the document
 doc.Save("Output.pdf");
 //Close the document
 doc.Close(true);
'Create a PDF document
Dim doc As New PdfDocument()
'Add pages to the document
Dim page As PdfPage = doc.Pages.Add()
'Create PDF graphics for the page
Dim graphics As PdfGraphics = page.Graphics
'Load the Tiff image
Dim image As New PdfBitmap("image.tif")
'Create masking image
Dim mask As New PdfImageMask(New PdfBitmap("mask.bmp"))
image.Mask = mask
'Draw the image
graphics.DrawImage(image, 0, 0)
'Saves the document
doc.Save("Output.pdf")
'Close the document
doc.Close(True)

Constructors

PdfMask()

protected PdfMask()