ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Print functions
  • Overview
  • Printing text
  • Printing images
  • Printing drawings
  • Other 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
Step 3: Printing characters, images, ...
Overview
This step consists in "sending the different elements to print to the printer":
  • text,
  • images,
  • drawings, ...
The actual print on the requested support (configured by iPreview or iDestination) will be effective at the end of print (iEndPrinting).
Printing text
The main WLanguage functions used to print texts are as follows.
Remarks:
  • The texts can use different fonts: the font is selected by iFont.
  • The texts can be printed at specific positions: iXPos and iYPos.
iAreaHeightCalculates the height of a fixed-width area required to print the entire text that uses the current font.
iDidotFontSelects the unit that will be used for the height of the fonts (created by iCreateFont): DIDOT point or PICA point.
iFontSelects the default font.
iPrintSends the character string passed as parameter to the print buffer.
iPrintAreaPrints a text in a rectangular area.
iPrintWordSends the character string passed in parameter to the print "buffer".
iTextHeightCalculates the height of the font for the text to print (in millimeters).
iTextWidthCalculates the width (in millimeters) of the text to print, according to the specified font.
iXPosUsed to manage the horizontal position (X-coordinate) of print cursor in the page.
iYPosUsed to manage the vertical position (Y-coordinate) of print cursor in the page.
Printing images
Several WLanguage functions can be used to print images while taking the image size into account.
iImageHeightCalculates the height of the image to print (in millimeters).
iImageWidthCalculates the width of the image to print (in millimeters).
iPrintBarCodePrints a bar code (inside a rectangle).
iPrintImageSends the image file to print to the print buffer.
iTransparentMagentaModifies the management mode of Magenta color in order for this color to be considered as being transparent (or not) in all the forthcoming prints.
Linux Only the images in JPEG format can be printed in Linux.
Printing drawings
The following WLanguage functions are used to easily print different shapes:
iBorderPrints a border at specified coordinates.
iEllipsePrints an ellipse (in a rectangle).
iHLinePrints a horizontal line at specified coordinates.
iLinePrints a line at specified coordinates.
iNewLinePrints a line (in Windows standard, with a rounded end) at specified coordinates.
iPrintBarCodePrints a bar code (inside a rectangle).
iRoundBorderPrints a border with rounded outlines at specified coordinates.
iTransparentMagentaModifies the management mode of Magenta color in order for this color to be considered as being transparent (or not) in all the forthcoming prints.
iVLinePrints a vertical line at specified coordinates.
iXPosUsed to manage the horizontal position (X-coordinate) of print cursor in the page.
iYPosUsed to manage the vertical position (Y-coordinate) of print cursor in the page.
Other functions
Several WLanguage functions are used to optimize the prints performed in WLanguage. You can manage, for example:
  • the page break
  • the size of the page, ...
iColumnNumReturns the number of the current column in a multi-column report.
iEndPrintingSignals the end of the document to print and actually starts printing the data stored in the printer spooler via the following functions: iPrint, iPrintImage, iNewLine, etc.
iPageHeightCalculates the height of printable page (in millimeters) while taking the top or bottom margins into account.
iPageHeightLeftCalculates the available height (in millimeters) left on the current page while taking into account the defined margins (top or bottom).
iPageNumReturns or initializes the number of the page currently printed.
iPageWidthCalculates the width (in millimeters) of the printable page while taking the left or right margins into account.
iReportPrintingStatusReturns the status of the current print.
iResetReinitializes the print settings (margins, font, paper format, orientation, ...) stored in the print library.
iSkipLineForces one or more line break.
iSkipPageGenerates a page break: the corresponding code is sent to the printer queue.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/21/2023

Send a report | Local help