PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Various
  • Printing in an HTML file
  • Printing in PDF
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Sends the image to print to the print buffer. The print is not started (only iEndPrinting can be used to start the print). The print mode of the image depends on the parameters passed to iPrintImage.
To print a background image in a report, use iPrintImage in the "Pre-print" process of Page Header block.
Note: Before calling iPrintImage, we advise you to check the existence of image file (with fDir).
Versions 20 and later
Note: This function must not be used to print the background image of a report. To define the background image of a report, use ..BackgroundImage. ..BackgroundImagePrinted is used to specify whether the image must be printed with the report.
New in version 20
Note: This function must not be used to print the background image of a report. To define the background image of a report, use ..BackgroundImage. ..BackgroundImagePrinted is used to specify whether the image must be printed with the report.
Note: This function must not be used to print the background image of a report. To define the background image of a report, use ..BackgroundImage. ..BackgroundImagePrinted is used to specify whether the image must be printed with the report.
Linux Only the images in JPEG format can be printed.
Android We do not recommend that you use images in GIF format (this format is not entirely supported by the Android system).
Windows Mobile Caution: The images will be printed only if the printer allows it. See Characteristics of a print on Mobile Device (Pocket PC) for more details.
Versions 18 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 18
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 19 and later
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
New in version 19
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
// Prints Flower.JPG at line 20mm, column 50 mm without stretching or reducing
iPrintImage("Flower.JPG", 20, 50)
iEndPrinting()
Syntax

Printing an image in a specific area Hide the details

iPrintImage(<Image Name> , <X1> , <Y1> , <X2> , <Y2> [, <Scale>])
<Image Name>: Character string or Image variable
  • Name of file containing the image to print. The format of this file must be one of the recognized image formats.
  • Name of Image Memo item.
  • Versions 17 and later
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
    New in version 17
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
Linux This parameter must correspond to an image file in JPEG format.
<X1>: Real
Horizontal coordinate of top left corner of image position (in millimeters).
Value included between 0 and the page width (returned by iPageWidth).
<Y1>: Real
Vertical coordinate of top left corner of image position (in millimeters).
Value included between 0 and the page height (returned by iPageHeight).
<X2>: Real
Horizontal coordinate of bottom right corner of border where the image must be printed (in millimeters).
Value included between 0 and the page width (returned by iPageWidth).
<Y2>: Real
Vertical coordinate of bottom right corner of border where the image must be printed (in millimeters).
Value included between 0 and the page height (returned by iPageHeight).
<Scale>: Integer or integer constant (optional)
Configures the scale of zoom performed on the image.
iHomotheticDisplayThe image is displayed in <X1> <Y1> without being distorted. It occupies either the entire height defined by <X1> and <X2>, or the entire width defined by <Y1> and <Y2>.
iHomoCenteredDisplayThe image is stretched or reduced to occupy the defined space in an optimal way without being distorted. If is centered in the area defined by <X1>, <Y1>, <X2> and <Y2>.
iNormalDisplay
(Default value)
The image is displayed in the entire rectangle defined by <X1>, <Y1>, <X2> and <Y2>. The image can be distorted.

Linux This parameter is not supported.

Printing an image at a specific position Hide the details

iPrintImage(<Image Name> , <X1> , <Y1> [, <Scale>])
<Image Name>: Character string or Image variable
  • Name of file containing the image to print. The format of this file must be one of the recognized image formats.
  • Name of Image Memo item.
  • Versions 17 and later
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
    New in version 17
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
<X1>: Real
Horizontal coordinate of top left corner of image position (in millimeters).
Value included between 0 and the page width (returned by iPageWidth).
<Y1>: Real
Vertical coordinate of top left corner of image position (in millimeters).
Value included between 0 and the page height (returned by iPageHeight).
<Scale>: Integer or integer constant (optional)
Scale of zoom applied to the image (included between 0 and 999).
If this parameter is not specified or if it is equal to 0, the image is displayed as is in <X1> <Y1> (equivalent to <Scale> = 100).

Printing an image section Hide the details

iPrintImage(<File Name> , <X1> , <Y1> , <X2> , <Y2> , <X3> , <Y3> , <X4> , <Y4> [, <Scale>])
<File Name>: Character string
  • Name of file containing the image to print. The format of this file must be one of the recognized image formats.
  • Name of Image Memo item.
  • Versions 17 and later
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
    New in version 17
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
    WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC) Name of Image variable.
<X1>: Real
Horizontal coordinate of top left corner of image position (in millimeters).
Value included between 0 and the page width (returned by iPageWidth).
<Y1>: Real
Vertical coordinate of top left corner of image position (in millimeters).
Value included between 0 and the page height (returned by iPageHeight).
<X2>: Real
Horizontal coordinate of bottom right corner of border where the image must be printed (in millimeters).
Value included between 0 and the page width (returned by iPageWidth).
<Y2>: Real
Vertical coordinate of bottom right corner of border where the image must be printed (in millimeters).
Value included between 0 and the page height (returned by iPageHeight).
<X3>: Real
Horizontal coordinate (x-coordinate) of the top left corner of the image part to print (in millimeters).
<Y3>: Real
Vertical coordinate (y-coordinate) of the top left corner of the image part to print (in millimeters).
<X4>: Real
Horizontal coordinate (x-coordinate) of the bottom right corner of the image part to print (in millimeters).
<Y4>: Real
Vertical coordinate (y-coordinate) of the bottom right corner of the image part to print (in millimeters).
<Scale>: Integer or integer constant (optional)
Configures the scale of zoom performed on the image.
iHomotheticDisplayThe image section is displayed in <X1> <Y1> without being distorted. It occupies either the entire height defined by <X1> and <X2>, or the entire width defined by <Y1> and <Y2>. The image is proportionally enlarged if necessary.
iHomoCenteredDisplayThe image section is stretched or reduced to occupy the specific area without being distorted. It occupies:
  • the entire height defined by <X1> and <X2>: the image is centered horizontally.
  • the entire width defined by <Y1> and <Y2>: the image is centered vertically.
The image is proportionally enlarged if necessary.
iNormalDisplay
(Default value)
The image section (defined by <X3>, <Y3>, <X4> and <Y4>) is displayed in the entire rectangle defined by <X1>, <Y1>, <X2> and <Y2>. The image can be distorted.
Remarks

Various

  • The origin (0,0) is located in the top left corner of the sheet. It takes the physical margins of printer into account.
  • If the image doesn't fit in the defined zone and if centering was requested (<Scale> = 999), then the centering option is abandoned.
WINDEVReports and QueriesUser code (UMC)

Printing in an HTML file

If iPrintImage is used to print a report (created with the report editor) in HTML format, the printed image will be distorted.
WINDEVWEBDEV - Server codeReports and QueriesiPhone/iPadUniversal Windows 10 AppAjaxUser code (UMC)

Printing in PDF

If only the coordinates of the top left corner of the image are specified, the image width depends on the printer DPI.
When printing in PDF, the PDF and the current printer have the same DPI: in this case, the width of the image in the PDF will correspond to the width of the image in the preview.
When printing in generic PDF, the PDF and the screen have the same DPI (to avoid depending on a printer). The image may not have the requested width.
We advise you to specify the coordinates of the bottom right corner of the image in order to always get the same result (in PDF, in generic PDF, and regardless of the printer DPI).
Components
WINDEVWEBDEV - Server codeReports and Queries wd230prn.dll
Windows Mobile wp230prn.dll
Java wd230java.jar
Linux wd230prn.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment