<pdfPage variable>.AddImage (Function)
In french: <Variable pdfPage>.AjouteImage
Adds an image to a page in an existing PDF file.
MyPDF is pdfDocument
MyImage is Image = fExeDir() + [fSep()] + "Signature.pdf"
MyPDF.Page.AddImage(MyImage, 10, 10, 150, 50, drHomotheticCentered)
MyPDF.Save(fExeDir() + [fSep()] + "RPT_NoName1_With_Image.pdf")
<Page used>.AddImage(<Image to add> , <X> , <Y> , <Width> , <Height> [, <Display mode>])
<Page used>: pdfPage variable
Name of the pdfPage variable that corresponds to the page to which the image must be added.
<Image to add>: Control, variable or string name
Image to be added to the PDF file page. The image can correspond to:
- a variable of type Image,
- the name and path of the image to be added to the page,
- an Image memo item,
- an Image control.
X-coordinate of the image on the page (in millimeters).
Y-coordinate of the image on the page (in millimeters).
Image width (in millimeters).
Image height (in millimeters).
<Display mode>: Optional Integer constant or combination of constants
Image display mode:
|drHighQuality||This constant can be combined with the homothetic resizing options.|
In homothetic mode, this constant is used to improve the quality of the image when this one is reduced in relation to its initial size.
|drHomothetic||The image is stretched or reduced to occupy the defined space in an optimal way without being distorted. It occupies:|
- the entire specified height.
- the entire specified width.
|drHomotheticCentered||The image is stretched or reduced to occupy the defined space in an optimal way without being distorted and it is centered. It occupies:|
- the entire specified height: the image is centered horizontally.
- the entire specified width: the image is centered vertically.
|drHomotheticExtended||The image is stretched or reduced in order for the smallest side of the image to be entirely displayed.|
|The image is stretched if necessary to fit the specified width and height.|
|drTiled||The image is tiled to occupy the entire new specified width and the entire new specified height.|
This page is also available for…