PdfDocumentGdiExtensions.AddImage Method (PdfDocument, Image, PdfColor)

Creates image(s) with the data and properties of specified Image, applies specified mask color to them and adds resulting image(s) to the end of the collection of document images.

Namespace:  BitMiracle.Docotic.Pdf.Gdi
Assembly:  BitMiracle.Docotic.Pdf.Gdi (in BitMiracle.Docotic.Pdf.Gdi.dll)


public static PdfImage AddImage(
	this PdfDocument doc,
	Image image,
	PdfColor maskColor
Public Shared Function AddImage ( 
	doc As PdfDocument,
	image As Image,
	maskColor As PdfColor
) As PdfImage


Type: BitMiracle.Docotic.Pdf.PdfDocument
The document.
Type: System.Drawing.Image
The existing Image from which to create PdfImage(s).
Type: BitMiracle.Docotic.Pdf.PdfColor
The color that masks transparent areas of the image(s).

Return Value

Type: PdfImage
The PdfImage for the first frame (page) found in the existing Image.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type PdfDocument. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).


This method adds a new image for each frame (page) found in the existing Image. Mask color gets applied for all added images.

See Also