PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllAdds an image from handle into a PDF document's collection and returns the index of the added image. Supported image formats: BMP, GIF, JPEG, PNG, TIFF.
|
| LONG AddImageFromHandle ( OLE_HANDLE handle ) |
Parameters
handle
Handle to an image object to insert.
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 from BLOB
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
{ OLE_HANDLE hImage is containing an image data }
ind := PDF.AddImageFromHandle(hImage);
PDF.ShowImage(ind, 0, 0);
PDF.SaveToFile('test.pdf', true);
C/C++
[copy to clipboard]
// PDF object is supposed to be created
// OLE_HANDLE hImage is containing an image data
long ind = PDF->AddImageFromHandle(hImage);
PDF->ShowImage(ind, 0, 0);
PDF->SaveToFile("test.pdf", true);
Adding an image from handle
C#
[copy to clipboard]
// PDF object is supposed to be created
// IntPtr hImage is containing an image data
long ind = PDF.AddImageFromHandle(hImage);
PDF.ShowImage(ind, 0, 0);
PDF.SaveToFile("test.pdf", true);
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created ' OLE_HANDLE hImage is containing an image data ind = PDF.AddImageFromHandle(hImage) PDF.ShowImage ind, 0, 0 PDF.SaveToFile "test.pdf", true
See Also
Reference


