Components for Developers
© 2000-2012, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Images
AddImageWithMask

See Also Example
Collapse All

This method inserts an image from a file using another monochrome image file as a mask for transparency.

Syntax

LONG AddImageWithMask (
BSTR fileName,
BSTR maskFileName
)
Parameters
fileName
Path to the file containing an image

maskFileName
Path to the file containing a monochrome image to use as a transparency mask

Return value
Index of the new image. If there is more than one image added, then the method returns the index of the most recently added image.

Remarks

The return value is an image identifier in the document's images collection and can be used in GetImageHeight, GetImageResolution, GetImageWidth, TransformImage, ShowImage, DrawImage.

Example

Adding an Image with a Mask

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
ind := PDF.AddImageWithMask('picture.tiff', 'mask.tiff');
PDF.ShowImage(ind, 0, 0);
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
long ind = PDF->AddImageWithMask("picture.tiff", "mask.tiff");
PDF->ShowImage(ind, 0, 0);
PDF->SaveToFile("test.pdf", true);
C#
[copy to clipboard]
// PDF object is supposed to be created
long ind = PDF.AddImageWithMask("picture.tiff", "mask.tiff");
PDF.ShowImage(ind, 0, 0);
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
ind = PDF.AddImageWithMask("picture.tiff", "mask.tiff")
PDF.ShowImage ind, 0, 0
PDF.SaveToFile "test.pdf", true

See Also

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF-X Pilot History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2012, Two Pilots