ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / PDF functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Adds an image to a page in an existing PDF file.
New in version 2025
Android This function is now available for Android applications.
Android Widget This function is now available in Android widget mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Example
MonPDF is pdfDocument
...
MonImage is Image = fExeDir() + [fSep()] + "Signature.pdf"
PDFAddImage(MonPDF.Page[1], MonImage, 10, 10, 150, 50, drHomotheticCentered)
PDFSave(MonPDF, fExeDir() + [fSep()] + "ETAT_SansNom1_Avec_Image.pdf")
Syntax
PDFAddImage(<Page used> , <Image to add> , <X> , <Y> , <Width> , <Height> [, <Display mode> [, <Orientation>]])
<Page used>: pdfPage variable
Name of the pdfPage variable that corresponds to the page to which the image is to 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:
drHighQualityThis constant can be combined with the homothetic resizing options.
In homothetic mode, this constant is used to improve the quality of the image when it 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.
drHomotheticCentered
(Default value)
The image is stretched or reduced to occupy the defined space in an optimal way without being distorted and it is centered. It occupies:
  • or the entire specified height: the image is centered horizontally.
  • or 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.
drStretchedThe image is stretched if necessary to fit the specified width and height.
<Orientation>: Real
Image orientation (in degrees).
Component: wd300wdpdf.dll
Minimum version required
  • Version 27
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help