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 / Print functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Prints a line (in Windows standard, with a rounded end) at specified coordinates. The print job is not started (only iEndPrinting can be used to start the print job).
Note The origin (0,0) is located in the top left-hand corner of the sheet. It takes the physical margins of the printer into account.
Example
// Trace une ligne rouge en continu
iNewLine(50, 10, 50, 200, iContinuous, 12, LightRed)
// Trace une ligne noire en continu
iNewLine(50, 10, 5, 100, iContinuous, 12, Black)
// Lance l'impression
iEndPrinting()
Syntax
<Result> = iNewLine(<X1> , <Y1> , <X2> , <Y2> [, <Style> [, <Thickness> [, <Color>]]])
<Result>: Boolean
  • True if the line was printed,
  • False otherwise.
<X1>: Real
Horizontal coordinate of the beginning of line (in millimeters). Value between 0 and the page width (returned by iPageWidth).
<Y1>: Real
Vertical coordinate of the beginning of line (in millimeters). Value between 0 and the page height (returned by iPageHeight).
<X2>: Real
Horizontal coordinate of the end of line (in millimeters). Value between 0 and the page width (returned by iPageWidth).
<Y2>: Real
Vertical coordinate of the end of line (in millimeters). Value between 0 and the page height (returned by iPageHeight).
<Style>: Optional integer constant
Type of line.
iContinuous
(default value)
Solid line
iDashedDashed line (-----)
iDotAndDashDot-and-dash line (-.-.)
iDottedDotted line (....)

WINDEVWEBDEV - Server code Warning: If <Thickness> is greater than 1, the line type will always be solid. This parameter can be ignored if it is not supported by the printer driver.
<Thickness>: Optional real
Line thickness (in picas). Default value = 1 (one Pica = 0.353 mm).
To get a thickness of 1 pixel, <Thickness> must be equal to 0. When the thickness increases, it is proportionally distributed between the two sides of line.
<Color>: Optional integer
Color used. If this parameter is not specified, the color used is black.
This color can correspond to:
Remarks
  • The cursor position is not modified when the outline is drawn.
  • The dotted type (iDotted) or the mixed type (iDotAndDash) combined with a thick border may produce unpleasant effects.
Component: wd300prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/27/2025

Send a report | Local help