PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
New WINDEV and WEBDEV 27 feature!
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Adds an image to a page in an existing PDF file.
Example
MyImage is Image = fExeDir() + [fSep()] + "Signature.pdf"
PDFAddImage(MyPDF.Page[1], MyImage, 10, 10, 150, 50, drHomotheticCentered)
PDFSave(MyPDF, fExeDir() + [fSep()] + "RPT_NoName1_With_Image.pdf")
Syntax
PDFAddImage(<Page used> , <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. This 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>: Real
X-coordinate of the image on the page (in millimeters).
<Y>: Real
Y-coordinate of the image on the page (in millimeters).
<Width>: Real
Image width (in millimeters).
<Height>: Real
Image height (in millimeters).
<Display mode>: Optional Integer constant or combination of constants
Image display mode:
drStretched
(Default value)
The image is stretched if necessary to fit the specified width and height.
Versions 18 and later
drHighQuality
New in version 18
drHighQuality
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.
drHomotheticThe 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.
drHomotheticCenteredThe 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.
drHomotheticExtendedThe image is stretched or reduced in order for the smallest side of the image to be entirely displayed.
drTiledThe image is tiled to occupy the entire new specified width and the entire new specified height.
Component: wd270wdpdf.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment