This method adds an image when the PDF document is created.
Parameters
Value | Explanation |
---|---|
ImageHandle | The RAW data image handle for the image (only JPEG and PNG formats are supported) |
x | The horizontal coordinate where the image will be added. (The bottom left corner of the image is added at the x,y coordinate. Units are in millimeter) |
y | The vertical coordinate where the image will be added. (The bottom left corner of the image is added at the x,y coordinate. Units are in millimeter) |
size | The size of the image. (Units are in millimeter) |
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The AddImage method adds an image when the PDF document is created. Supported image formats are JPEG and PNG.
Set the image location using the x, y paramters. The bottom left corner of the image is attached to the x,y location. Set the length of the image's largest dimension, either the vertical or horizontal dimension, into the size parameter. The units are in millimeters. The aspect ratio of the original image will be maintained.
It is possible to add multiple images in one page by repeating the AddImage method, changing the ImageHandle, x,y, and size parameters and executing this method again. The AddImage method is used with the Start, AddPage, and Finish methods.