PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Properties specific to the description of Watermark variables
  • Functions that use the Watermark variables
  • Reinitialization
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
Watermark (Type of variable)
In French: Filigrane
The Watermark type is used to handle the text printed in watermark in the reports created with the report editor or by programming.
The Watermark type is used to define the advanced characteristics of the text in watermark. The characteristics of this text can be defined and modified by several WLanguage properties.
Note: See Declaring a variable for more details.
Example
// Print a watermark in report background
MyWatermark is Watermark

// Text of the watermark
MyWatermark..Text = "Confidential"
// Font used
MyWatermark..Font..Name = "Arial"
// The watermark will be horizontally centered at bottom
MyWatermark..Position = iCenterH + iBottom

// Print preview
iPreview()

// Indicates that the watermark will be printed during the print and in the duplicates
iParameterWatermark(iWatermarkPrinting + iWatermarkDuplicate, MyWatermark)

// Starts printing the report
iPrintReport(RPT_Commercial)
Remarks

Properties specific to the description of Watermark variables

The following properties can be used to handle a text as watermark:
Property nameType usedEffect
OrientationInteger constantInclination angle of watermark text. This angle can correspond to one of the following constants:
  • iFontAngle: the inclination angle of the text corresponds to the angle defined in the font.
  • iDownwardDiagonal: the text is printed on a 45° downward diagonal.
  • iUpwardDiagonal: the text is printed on a 45° upward diagonal.
  • iHorizontal: the text is printed horizontally.
OpacityIntegerPercentage of opacity for the watermark text. This percentage varies from 0 (invisible text) to 100 (totally opaque text).
FontFont variableCharacteristics of the font that must be used for the watermark text.
PositionInteger constantConstant (or combination of constants) used to define the position of watermark text:
  • iBottom: the text is aligned at the bottom of text area.
  • iCenterH: the text is horizontally centered in the text area.
  • iCenterV: the text is vertically centered in the text area.
  • iRight: the text is aligned on the right of text area
SizeInteger constantSize of font. This size corresponds to one of the following constants:
  • iAutomatic: the font size is automatically chosen according to the length the watermark text and to the width of report.
  • iFontSize: the size defined in the font is used.
TextCharacter stringText of the watermark.
Note: These properties can be used with one of the following syntaxes:
  • <Variable Name>..<Property Name>
  • <Variable Name>.<Property Name>

Functions that use the Watermark variables

Versions 17 and later
iParameterWatermark
New in version 17
iParameterWatermark
iParameterWatermark
Adds a watermark into a report (report created in the report editor or printed report).

Reinitialization

To reinitialize the content of a Watermark variable, you have the ability to use VariableReset.
Related Examples:
WD Reports Training (WINDEV): WD Reports
[ + ] This example presents the different methods for creating a report:

- prints based on different data sources (queries, variables, ...)
- prints based on controls (Table, Spreadsheet, PVT, ...)
- printing composite reports
- specific prints (portrait/landscape, report with watermark, report with bar code, ...)
Minimum required version
  • Version 17
This page is also available for…
Comments
Click [Add] to post a comment