PDF Creator Pilot documentation |
Download CHM version of this manual. |
|
![]() ![]() Collapse AllThis method draws an image in a PDF document.
|
| HRESULT PlaceImageToCurrentPage ( LONG imageIndex, DOUBLE left, DOUBLE top ) |
Parameters
imageIndex
Index of the image
left
X coordinate of the position of the image
top
Y coordinate of the position of the image
Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.
Remarks
This 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.
The index of the image can be retrieved from any image loading method, such as AddImageFromFile.
Equivalent in new interface: IPDFDocument4::ShowImage.
Example
How to Place 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


