PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllDraws an image in a PDF document.
|
| HRESULT PlaceImageToCurrentPage ( LONG imageIndex, DOUBLE left, DOUBLE top ) |
Parameters
imageIndex
Image index.
left
X-coordinate of image position.
top
Y-coordinate of image position.
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
The method places the image data with a top-left corner at (left, top), normal (zero-angle) orientation and original size into the current content stream for the page.
Image index can be retrieved from any image loading method, like AddImageFromFile.
Example
How to show an image
Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
j := PDF.AddImageFromFile('picture.jpg');
PDF.PlaceImageToCurrentPage(j, 200, 0);
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
LONG j = PDF->AddImageFromFile("picture.jpg");
PDF->PlaceImageToCurrentPage(j, 200, 0);
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
long j = PDF.AddImageFromFile("picture.jpg");
PDF.PlaceImageToCurrentPage(j, 200, 0);
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
j = PDF.AddImageFromFile("picture.jpg")
PDF.PlaceImageToCurrentPage j, 200, 0
PDF.EndDoc
See Also


