ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / PDF functions
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
MyPDF is pdfDocument
...
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> [, <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. 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>: 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 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.
drStretched
(Default value)
The image is stretched if necessary to fit the specified width and height.
drTiledThe image is tiled to occupy the entire new specified width and the entire new specified 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: 07/02/2024

Send a report | Local help