Components for Developers
© 2000-2008, Two Pilots

PDF Library Download Features Manual Tutorials FAQ Pricing HTML2PDF Add-on History In the Lab

PDF Creator Pilot documentation

Download CHM version of this manual.
Images
AddImageWithMask

See Also Example
Collapse All

Inserts an image from a file using another monochrome image file as mask for transparency.

Syntax

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

maskFileName
Path to the file with monochrome image to use as transparency mask.

Return value
New image index. If there is more then one image added then method returns index of a last added image.

Remarks

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

Example

Adding an image with 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 Add-on History In the Lab

 

 

PDF Library | Virtual Printer | Converters to PDF

Support | Blog | Forum | Contacts

© 2000-2008, Two Pilots