PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Modifying the print parameters via constants
  • Reinitializing the print module
  • Number of copies
  • Managing the custom paper format
  • Various
  • iConfigure and iParameter
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
Retrieves the configuration of the printer and configures the print. To configure the print:
  • open the window for print configuration: quality, number of copies, ...
    If the information is validated by the user, the changes are performed for the current application only.
  • configure the print characteristics (quality, number of copies, ...) without opening the configuration window.
    By default, the setting is valid until the next call to iParameter or to iReset (in this last case, the default Windows settings will be used during the next print).
    To save the parameters modified by iParameter so that they become the default parameters of Windows, use iParameter associated with the iPrinterDefault constant.
Calling iConfigure after iParameter reinitializes the print module: the setting performed is re-initialized.
Reports and Queries
// Print in portrait mode
iParameter(iOrientation, iOrientation_Portrait)
// Modify the page height
iParameter(iPaperLength, 2000)
// Modify the number of copies
iParameter(iCopies, 2)
// Modifies the collate mode
iParameter(iCollate, True)
Reports and Queries
// The user configures the printer
iParameter()
// Display the printer parameters
Trace("------------------------------------------------------------------")
Trace("Orientation = " + iParameter(iOrientation))
Trace("PaperSize = " + iParameter(iPaperSize))
Trace("PageHeight = " + iParameter(iPaperLength))
Trace("PageWidth = " + iParameter(iPaperWidth))
Trace("NbCopies = " + iParameter(iCopies))
Trace("PaperSource = " + iParameter(iPaperSource))
Trace("YResolution = " + iParameter(iYResolution))
Trace("Color = " + iParameter(iColor))
Trace("Collate = " + iParameter(iCollate))
SpecialParameters is Buffer = iParameter(iExtraParameters)
Trace("Special size = " + Length(SpecialParameters))
Trace("Special = " + SpecialParameters)
Trace("------------------------------------------------------------------")
Syntax
Reports and Queries

Opening the standard window for configuring the print Hide the details

<Result> = iParameter()
<Result>: Boolean
  • True if the information typed in the configuration window was validated by the user,
  • False if user cancelation.

Retrieving the print parameters Hide the details

<Result> = iParameter(<Parameter to retrieve>)
<Result>: Type of parameter to retrieve (constant, integer, boolean, character string)
Value of requested parameter for the current printer.
<Parameter to retrieve>: Constant
Specifies the parameter to retrieve from the current printer configuration. The result will depend on the parameter retrieved.
iPaperSourceDefines the paper source for the printer. If this parameter is used, <Result> can take one of the following constants as value:
iPaperSource_AutoAutomatic paper feed
iPaperSource_LowerLower tray paper feed
iPaperSource_CassetteTray paper feed
iPaperSource_EnvelopeEnvelope feed
iPaperSource_EnvelopeManualManual envelope feed
iPaperSource_LargeCapacityLarge capacity paper feed
iPaperSource_LargeFormatLarge format paper feed
iPaperSource_UpperUpper tray paper feed
iPaperSource_ManualManual paper feed
iPaperSource_MiddleMiddle tray paper feed
iPaperSource_SmallFormatSmall format paper feed
iPaperSource_TractorTractor paper feed
iPaperSource_OnlyOneOnly one feed
iCollateDefines how the pages are collated. If this parameter is used, <Result> is a boolean that can take for value:
  • True if the pages are collated (print the pages 1, 2, 3 ... of the first set, then the pages 1, 2, 3, ... of the second set, ...).
  • False if the pages are not collated (print all the copies of page 1, then all the copies of page 2, ...). Caution: This option consumes a lot of memory.
iColorUsed to find out the management mode of colors. If this parameter is used, <Result> can take one of the following constants as value:
iColor_ColorPrint in color
iColor_MonoPrint in grayscale
iScaleAllows you to find out the scale used during the print. In this case, <Result> corresponds to an integer.
iPaperSizeAllows you to find out the paper format used. If this parameter is used, <Result> can take one of the following constants as value:
iPaperSize_10x1410 x 14 inch paper
iPaperSize_11x1711 x 17 inch paper
iPaperSize_A3A3 paper (297 x 420 mm)
iPaperSize_A4A4 paper (210 x 297 mm)
iPaperSize_A4SmallSmall A4 paper (210 x 297 mm)
iPaperSize_A5A5 paper (148 x 210 mm)
iPaperSize_GermanSTDFanfold paper (8.5 x 12 inches)
iPaperSize_GermanLGLFanfold paper (8.5 x 13 inches)
iPaperSize_B4B4 paper (250 x 354 mm)
iPaperSize_B5B5 paper (182 x 257 mm)
iPaperSize_FanfoldUSFanfold paper (14.875 x 11 inches)
iPaperSize_Envelope9Envelope #9 (3.875 x 8.875 inches)
iPaperSize_Envelope10Envelope #10 (4.125 x 9.5 inches)
iPaperSize_Envelope11Envelope #11 (4.5 x 10.375 inches)
iPaperSize_Envelope12Envelope #12 (4.5 x 4.5 x 11 inches)
iPaperSize_Envelope14Envelope #14 (5 x 11.5 inches)
iPaperSize_EnvelopeB4B4 envelope (250 x 353 mm)
iPaperSize_EnvelopeB5B5 envelope (176 x 250 mm)
iPaperSize_EnvelopeB6B6 envelope (176 x 125 mm)
iPaperSize_EnvelopeC3C3 envelope (324 x 458 mm)
iPaperSize_EnvelopeC4C4 envelope (229 x 324 mm)
iPaperSize_EnvelopeC5C5 envelope (162 x 229 mm)
iPaperSize_EnvelopeC6C6 envelope (114 x 162 mm)
iPaperSize_EnvelopeC65C65 envelope (114 x 229 mm)
iPaperSize_EnvelopeDLDL envelope (110 x 220 mm)
iPaperSize_EnvelopeItalyEnvelope 110 x 230 mm
iPaperSize_EnvelopeMonarchEnvelope 3.875 x 7.5 inches
iPaperSize_EnvelopePersoEnvelope 3.625 x 6.5 inches
iPaperSize_ExecutiveExecutive paper (7.5 x 10.5 inches)
iPaperSize_FolioFolio paper (8.5 x 13 inches)
iPaperSize_LedgerLedger paper (17 x 11 inches)
iPaperSize_LegalLegal paper (8.5 x 14 inches)
iPaperSize_LetterSmallSmall letter paper (8.5 x 11 inches)
iPaperSize_LetterLetter paper (8.5 x 11 inches)
iPaperSize_NoteNote paper (8.5 x 11 inches)
iPaperSize_QuartoQuarto paper (215 x 275 mm)
iPaperSize_StatementStatement paper (5.5 x 8.5 inches)
iPaperSize_TabloidTabloid paper (11 x 17 inches)
iPaperSize_CSheetSize C sheet
iPaperSize_DSheetSize D sheet
iPaperSize_ESheetSize E sheet
iFormatCustomPaperAllows you to find out the size of custom paper used. The size is specified by the height and width. In this case, <Result> corresponds to a string.
iPaperLengthAllows you to find out the height of paper used (in tenth of millimeter). In this case, <Result> is an integer.
iPaperWidthAllows you to find out the width of paper used (in tenth of millimeter). In this case, <Result> is an integer.

iCopiesAllows you to find out the number of copies by default. In this case, <Result> is an integer. If this parameter is used, <Result> corresponds to a buffer.
iOrientationAllows you to find out the paper orientation. If this parameter is used, <Result> can take one of the following constants as value:
iOrientation_LandscapePrint in landscape mode
iOrientation_PortraitPrint in portrait mode
iExtraParametersUsed to find out the parameters specific to the printer (if the printer is also a scanner for example).
iQualityUsed to find out the parameters for print quality. If this parameter is used, <Result> can take one of the following constants as value:
iQuality_LowPrint in low quality
iQuality_DraftPrint in draft mode
iQuality_HighPrint in high quality
iQuality_MediumPrint in medium quality

The quality of the print can also correspond to the print resolution (300, 600, 1200 or 1600 depending on the printer).
iDuplexUsed to find out the parameters for duplex printing. If this parameter is used, <Result> can take one of the following constants as value:
iDuplex_HorizontalPrint in horizontal duplex mode
iDuplex_SimplePrint on a single side
iDuplex_VerticalPrint in vertical duplex mode
iYResolutionUsed to find out the vertical resolution (in dots per inch). If this parameter is used, <Result> is an integer.
Versions 17 and later
iRTFWithImagesAndTables
New in version 17
iRTFWithImagesAndTables
iRTFWithImagesAndTables
Allows you to find out whether the print uses the optimized mode for managing the images and tables in the RTF controls found in the reports. If this parameter is used, <Result> is a boolean:
  • True if the print uses the optimized mode for managing the images and tables in the RTF controls found in the reports.
  • False otherwise.
iTrueTypeUsed to find out the parameters for printing the True Type fonts. If this parameter is used, <Result> can take one of the following constants as value:
iTrueType_BitmapTrue Type font printed in bitmap
iTrueType_DownloadDownloaded TrueType font
iTrueType_SubdevTrueType font of device
Versions 24 and later
iMediaType
New in version 24
iMediaType
iMediaType
Allows you to know the type of media used for the printout. If this parameter is used, <Result> can take one of the following constants as value:
iMediaType_TransparentFilmPrint on transparent film.
iMediaType_GlossyPaperPrint on glossy paper.
iMediaType_PlainPaperPrint on plain paper.

Modifying the print parameters Hide the details

<Result> = iParameter(<Parameter to modify> , <Parameter value>)
<Result>: Boolean
  • True if the modification was performed,
  • False if a problem occurred (parameter not recognized).
<Parameter to modify>: Constant
Specifies the parameter to retrieve from the current printer configuration. The result will depend on the parameter retrieved.
iPaperSourceUsed to modify the paper source of the printer. If this parameter is used, <Parameter value> can take one of the following constants for value:
iPaperSource_AutoAutomatic paper feed
iPaperSource_LowerLower tray paper feed
iPaperSource_CassetteTray paper feed
iPaperSource_EnvelopeEnvelope feed
iPaperSource_EnvelopeManualManual envelope feed
iPaperSource_LargeCapacityLarge capacity paper feed
iPaperSource_LargeFormatLarge format paper feed
iPaperSource_UpperUpper tray paper feed
iPaperSource_ManualManual paper feed
iPaperSource_MiddleMiddle tray paper feed
iPaperSource_SmallFormatSmall format paper feed
iPaperSource_TractorTractor paper feed
iPaperSource_OnlyOneOnly one feed
iCollateUsed to modify how the pages are collated. If this parameter is used, <Parameter value> is a boolean that can take for value:
  • True if the pages are collated (print the pages 1, 2, 3 ... of the first set, then the pages 1, 2, 3, ... of the second set, ...).
  • False if the pages are not collated (print all the copies of page 1, then all the copies of page 2, ...). Caution: This option consumes a lot of memory.
iColorUsed to modify the management mode of colors. If this parameter is used, <Parameter value> can take one of the following constants for value:
iColor_ColorPrint in color
iColor_MonoPrint in grayscale
iScaleAllows you to modify the percentage of scale used during the print. In this case, <Parameter value> corresponds to an integer.
iPaperSizeAllows you to modify the size of paper used. If this parameter is used, <Parameter value> can take one of the following constants for value:
iPaperSize_10x1410 x 14 inch paper
iPaperSize_11x1711 x 17 inch paper
iPaperSize_A3A3 paper (297 x 420 mm)
iPaperSize_A4A4 paper (210 x 297 mm)
iPaperSize_A4SmallSmall A4 paper (210 x 297 mm)
iPaperSize_A5A5 (148 x 20 mm)
iPaperSize_GermanSTDFanfold paper (8.5 x 12 inches)
iPaperSize_GermanLGLFanfold paper (8.5 x 13 inches)
iPaperSize_B4B4 paper (250 x 354 mm)
iPaperSize_B5B5 paper (182 x 257 mm)
iPaperSize_FanfoldUSFanfold paper (14.875 x 11 inches)
iPaperSize_Envelope9Envelope #9 (3.875 x 8.875 inches)
iPaperSize_Envelope10Envelope #10 (4.125 x 9.5 inches)
iPaperSize_Envelope11Envelope #11 (4.5 x 10.375 inches)
iPaperSize_Envelope12Envelope #12 (4.5 x 4.5 x 11 inches)
iPaperSize_Envelope14Envelope #14 (5 x 11.5 inches)
iPaperSize_EnvelopeB4B4 envelope (250 x 353 mm)
iPaperSize_EnvelopeB5B5 envelope (176 x 250 mm)
iPaperSize_EnvelopeB6B6 envelope (176 x 125 mm)
iPaperSize_EnvelopeC3C3 envelope (324 x 458 mm)
iPaperSize_EnvelopeC4C4 envelope (229 x 324 mm)
iPaperSize_EnvelopeC5C5 envelope (162 x 229 mm)
iPaperSize_EnvelopeC6C6 envelope (114 x 162 mm)
iPaperSize_EnvelopeC65C65 envelope (114 x 229 mm)
iPaperSize_EnvelopeDLDL envelope (110 x 220 mm)
iPaperSize_EnvelopeItalyEnvelope 110 x 230 mm
iPaperSize_EnvelopeMonarchEnvelope 3.875 x 7.5 inches
iPaperSize_EnvelopePersoEnvelope 3.625 x 6.5 inches
iPaperSize_ExecutiveExecutive paper (7.5 x 10.5 inches)
iPaperSize_FolioFolio paper (8.5 x 13 inches)
iPaperSize_LedgerLedger paper (17 x 11 inches)
iPaperSize_LegalLegal paper (8.5 x 14 inches)
iPaperSize_LetterSmallSmall letter paper (8.5 x 11 inches)
iPaperSize_LetterLetter paper (8.5 x 11 inches)
iPaperSize_NoteNote paper (8.5 x 11 inches)
iPaperSize_QuartoQuarto paper (215 x 275 mm)
iPaperSize_StatementStatement paper (5.5 x 8.5 inches)
iPaperSize_TabloidTabloid paper (11 x 17 inches)
iPaperSize_CSheetSize C sheet
iPaperSize_DSheetSize D sheet
iPaperSize_ESheetSize E sheet
iFormatCustomPaperAllows you to modify the size of custom paper used. The size is specified by the height and width. In this case, <Parameter value> corresponds to a string.
iPaperLengthAllows you to modify the height of paper used (in tenth of millimeter). In this case, <Parameter value> is an integer.
iPrinterDefaultUsed to modify the default printer setting. In this case, <Parameter value> is a boolean:
  • True to modify the default printer setting.
  • False not to modify the default printer setting.
iPaperWidthAllows you to modify the width of paper used (in tenth of millimeter). In this case, <Parameter value> is an integer.
iCopiesUsed to modify the number of copies by default. In this case, <Parameter value> is an integer.
iOrientationUsed to modify the paper orientation. If this parameter is used, <Parameter value> can take one of the following constants for value:
iOrientation_LandscapePrint in landscape mode
iOrientation_PortraitPrint in portrait mode
This parameter is ignored when printing in PCL format.
iExtraParametersUsed to modify the parameters specific to a printer (if the printer is also a scanner for example). If this parameter is used, <Parameter value> must be a buffer.
iQualityUsed to modify the parameters for print quality. If this parameter is used, <Parameter value> can take one of the following constants for value:
iQuality_LowPrint in low quality
iQuality_DraftPrint in draft mode
iQuality_HighPrint in high quality
iQuality_MediumPrint in medium quality
iDuplexUsed to modify the parameters for printing in duplex mode. If this parameter is used, <Parameter value> can take one of the following constants for value:
iDuplex_HorizontalPrint in horizontal duplex mode
iDuplex_SimplePrint on a single side
iDuplex_VerticalPrint in vertical duplex mode
iYResolutionUsed to modify the vertical resolution (in dots per inch). If this parameter is used, <Parameter value> is an integer.
Versions 17 and later
iRTFWithImagesAndTables
New in version 17
iRTFWithImagesAndTables
iRTFWithImagesAndTables
Used to modify the management mode of images and tables in the RTF controls found in the reports. If this parameter is used, <Parameter value> is a boolean:
  • True to use the optimized mode for managing the images and tables in the RTF controls found in the reports.
  • False otherwise.
iPrinterTypeAllows you to modify the printer used. If this parameter is used, <Parameter value> corresponds to one of the printer types recognized by WINDEV Mobile. See Types of printers recognized by WINDEV Mobile for more details.
iTrueTypeUsed to modify the parameters for printing TrueType fonts. If this parameter is used, <Parameter value> can take one of the following constants for value:
iTrueType_BitmapTrueType font printed in bitmap
iTrueType_DownloadDownloaded TrueType font
iTrueType_SubdevTrueType font of device.
Versions 24 and later
iMediaType
New in version 24
iMediaType
iMediaType
Allows you to change the type of media used for the printout. If this parameter is used, <Result> can take one of the following constants as value:
iMediaType_TransparentFilmPrint on glossy paper.
iMediaType_GlossyPaperPrint on glossy paper.
iMediaType_PlainPaperPrint on plain paper
<Parameter value>: Type of the parameter to modify (constant, integer, boolean, character string)
Value of parameter to modify. This value depends on the parameter to modify.
Reports and Queries

Modifying the print settings (former syntax kept for backward compatibility) Hide the details

<Result> = iParameter(<Parameter>)
<Result>: Boolean
  • True if the new parameters have been applied,
  • False otherwise.
<Parameter>: Character string (with quotes)
Used to define the new parameter. The following format is used: <Parameter> = <Value>. For example, "DEFAULT=YES". The table below presents the different options that can be configured.
FREEZEThe printer selected by iConfigure will not be modified until the next call to iConfigure or iReset, or until the end of program execution
DEFAULT = <YesNo>If "DEFAULT = YES", the parameters are saved and they become the default parameters
If "DEFAULT = NO", the parameters are not saved
COLLATE = <Yes/No>If "COLLATE = YES", when printing multiple copies, the pages will be collated (print the pages 1, 2, 3 ... of the first set, then the pages 1, 2, 3, ... of the second set, ...)
If "COLLATE = NO", when printing multiple copies, the pages will not be collated (print all copies of page 1, then print all copies of page 2, ...). Caution: This option consumes a lot of memory.
ORIENTATION = PORTRAITPrint in portrait mode
ORIENTATION = LANDSCAPEPrint in landscape mode. This parameter is ignored when printing in PCL format.
PAPERSIZE=LETTERLetter paper (8.5 x 11 inches)
PAPERSIZE=SMALLLETTERSmall letter paper (8.5 x 11 inches)
PAPERSIZE=TABLOIDTabloid paper (11 x 17 inches)
PAPERSIZE = LEDGERLedger paper (17 x 11 inches)
PAPERSIZE = LEGALLegal paper (8.5 x 14 inches)
PAPERSIZE = STATEMENTStatement paper (5.5 x 8.5 inches)
PAPERSIZE = EXECUTIVEExecutive paper (7.5 x 10.5 inches)
PAPERSIZE = A3A3 paper (297 x 420 mm)
PAPERSIZE = A4A4 paper (210 x 297 mm)
PAPERSIZE = SMALLA4Small A4 paper (210 x 297 mm)
PAPERSIZE = A5A5 (148 x 20 mm)
PAPERSIZE = B4B4 paper (250 x 354 mm)
PAPERSIZE = B5B5 paper (182 x 257 mm)
PAPERSIZE = FOLIOFolio paper (8.5 x 13 inches)
PAPERSIZE = QUARTOQuarto paper (215 x 275 mm)
PAPERSIZE = 10X1410 x 14 inch paper
PAPERSIZE = 11X1711 x 17 inch paper
PAPERSIZE = NOTENote paper (8.5 x 11 inches)
PAPERSIZE = ENVELOPE9Envelope #9 (3.875 x 8.875 inches)
PAPERSIZE = ENVELOPE10Envelope #10 (4.125 x 9.5 inches)
PAPERSIZE = ENVELOPE11Envelope #11 (4.5 x 10.375 inches)
PAPERSIZE = ENVELOPE12Envelope #12 (4.5 x 4.5 x 11 inches)
PAPERSIZE = ENVELOPE14Envelope #14 (5 x 11.5 inches)
PAPERSIZE = CSIZESize C sheet
PAPERSIZE = DSIZESize D sheet
PAPERSIZE = ESIZESize E sheet
PAPERSIZE = ENVELOPEDLDL envelope (110 x 220 mm)
PAPERSIZE = ENVELOPEC3C3 envelope (324 x 458 mm)
PAPERSIZE = ENVELOPEC4C4 envelope (229 x 324 mm)
PAPERSIZE = ENVELOPEC5C5 envelope (162 x 229 mm)
PAPERSIZE = ENVELOPEC6C6 envelope (114 x 162 mm)
PAPERSIZE = ENVELOPEC65C65 envelope (114 x 229 mm)
PAPERSIZE = ENVELOPEB4B4 envelope (250 x 353 mm)
PAPERSIZE = ENVELOPEB5B5 envelope (176 x 250 mm)
PAPERSIZE = ENVELOPEB6B6 envelope (176 x 125 mm)
PAPERSIZE = ENVELOPEITALYEnvelope 110 x 230 mm
PAPERSIZE = ENVELOPEMONARCHEnvelope 3.875 x 7.5 inches
PAPERSIZE = ENVELOPEPERSOEnvelope 3.625 x 6.5 inches
PAPERSIZE = FANFOLDUSFanfold paper (14.875 x 11 inches)
PAPERSIZE = FANFOLDGERMANSTDFanfold paper (8.5 x 12 inches)
PAPERSIZE = FANFOLDGERMANLGLFanfold paper (8.5 x 13 inches)
PAPERSIZE = USERDEFINEDSize expressed in height and width
PAGEHEIGHT = <Value>Height of page in 10th of millimeter
PAGEWIDTH = <Value>Width of page in 10th of millimeter
COPIES = <Value>Integer indicating the number of copies
PAPERSOURCE = AUTOAutomatic paper feed
PAPERSOURCE = LOWERLower tray paper feed
PAPERSOURCE = CASSETTETray paper feed
PAPERSOURCE = MANUALManual paper feed
PAPERSOURCE = ENVELOPEEnvelope feed
PAPERSOURCE = MIDDLEMiddle tray paper feed
PAPERSOURCE = ENVELOPEMANUALManual envelope feed
PAPERSOURCE = ONLYONEOnly one feed
PAPERSOURCE = SMALLFORMATSmall format paper feed
PAPERSOURCE = LARGECAPACITYLarge capacity paper feed
PAPERSOURCE = TRACTORTractor paper feed
PAPERSOURCE = LARGEFORMATLarge format paper feed
PAPERSOURCE = UPPERUpper tray paper feed
SCALE = <Value>Percentage of the scale
QUALITY = HIGHHigh quality
QUALITY = MEDIUMMedium quality
QUALITY = LOWLow quality
QUALITY = DRAFTDraft quality
COLOR = COLORColor
COLOR = MONOMonochrome
DUPLEX = SIMPLEXPrint on a single side
DUPLEX = VERTICALVertical duplex
DUPLEX = HORIZONTALHorizontal duplex
RESOLUTIONY = <Value>Vertical resolution (in dots per inch)
TRUETYPE = BITMAPTrue Type font in bitmap
TRUETYPE = DOWNLOADDownloaded TrueType font
TRUETYPE = SUBDEVTrueType font of device
SPOOLER = OPTIMIZEOptimizes the speed of print. In this case, the preview has a lower quality and the display may change when the zoom factor is modified.
MODE55=<YES/NO>Used to restore the operating mode of WINDEV 5.5: The line break is performed according to the size of the largest font used in the current line (by default, the line break is performed according to the size of last font used in the current line).
ArialSubstitution=NoWhen printing in PDF format, the size of generated PDF file is optimized by replacing the "Arial" font by the Helvetica font. If the Helvetica font is not installed on the computer or if you do not want this substitution to be performed, all you have to do is use iParameter("ArialSubstitution=No").
RTFJustification=YesAllows you to keep the justification when printing an RTF area with iPrintZoneRTF.
Versions 16 and later
ANIMATIONCLICKABLECONTROL=NO
New in version 16
ANIMATIONCLICKABLECONTROL=NO
ANIMATIONCLICKABLECONTROL=NO
Used to disable the star that appears on the clickable controls of a report.
Versions 16 and later
OVERALLPERSISTENCE=YES
New in version 16
OVERALLPERSISTENCE=YES
OVERALLPERSISTENCE=YES
Used to keep the behavior of version 15:
  • Until version 15, the zoom value and the preview position were saved and restored by application.
  • From version 16, the zoom value and the preview position are saved by report.
Versions 17 and later
RTFWINDOWS=NO
New in version 17
RTFWINDOWS=NO
RTFWINDOWS=NO
Used to properly manage the tables and images in the RTF controls found in the reports.
  • If RTFWINDOWS=YES: the tables and the images found in the RTF controls of reports are printed by Windows. In most cases, this print is not correct.
  • If RTFWINDOWS=NO: the tables and the images found in the RTF controls of reports are not printed by Windows but by the print module of WINDEV or WEBDEV. This print is optimized.
Note: We recommend that you use the following syntax:
iParameter(iRTFWithImagesAndTables, True)
Versions 24 and later
MEDIATYPE = TRANSPARENTFILM
New in version 24
MEDIATYPE = TRANSPARENTFILM
MEDIATYPE = TRANSPARENTFILM
Print on a transparent film.
Versions 24 and later
MEDIATYPE = GLOSSYPAPER
New in version 24
MEDIATYPE = GLOSSYPAPER
MEDIATYPE = GLOSSYPAPER
Print on a glossy paper.
Versions 24 and later
MEDIATYPE = PLAINPAPER
New in version 24
MEDIATYPE = PLAINPAPER
MEDIATYPE = PLAINPAPER
Print on a plain paper.
Remarks

Modifying the print parameters via constants

If the requested setting is not accepted by the printer, the returned value will not be the one passed in parameter.
For example, to use the A3 format with a printer that does not support the A3 format:
// Switch to A3 format
IF iParameter(iPaperSize, iPaperSize_A3) = False THEN
        // failure switching to A3 format
END
The value passed in parameter and the result of iParameter can correspond to a constant or to a value corresponding to a specific parameter of printer driver. For example:
PaperSource is int
PaperSource = iParameter(iPaperSource)
SWITCH PaperSource
CASE iPaperSource_Auto
Info("Paper source: automatic mode")
CASE iPaperSource_Lower
Info("Paper source: bottom tray")
CASE iPaperSource_Cassette
Info("Paper source: cassette")
CASE iPaperSource_Manual
Info("Paper source: manually")
CASE iPaperSource_Envelope
Info("Paper source: envelope tray")
CASE iPaperSource_Middle
Info("Paper source: middle tray")
CASE iPaperSource_EnvelopeManual
Info("Paper source: manual envelope")
CASE iPaperSource_OnlyOne
Info("Paper source: a single page")
CASE iPaperSource_SmallFormat
Info("Paper source: small format")
CASE iPaperSource_LargeCapacity
Info("Paper source: large capacity")
CASE iPaperSource_Tractor
Info("Paper source: tractor mode")
CASE iPaperSource_LargeFormat
Info("Paper source: large format")
CASE iPaperSource_Upper
Info("The paper source is the upper tray")
OTHER CASE
// Retrieve a specific value of the driver:
// A non-standard paper tray
Info(StringBuild("Paper source: %1. " + ...
"Corresponds to a specific parameter " + ...
"of the printer driver.", PaperSource))
END
Reports and Queries

Reinitializing the print module

If iParameter returns True, the print module is reinitialized. Therefore, iParameter must be used before any other print function. Otherwise, all operations previously performed by the print functions will be ignored.
If a print is in progress, iParameter closes this print. Therefore, iParameter must be called before the start of print.
Reports and Queries

Number of copies

The number of copies to print is reset to 1 after each print. To avoid this, use the following code line before the next print:
iParameter(iCopies, 2)
Note: If a number of copies is specified by the user (iParameter or iParameterReport) before printing the report, this number of copies will have priority over the one specified by ..NbCopy.
Reports and Queries

Managing the custom paper format

To manage the custom paper formats with iParameter (syntax using the constants), simply use the constants iPaperLength and iPaperWidth and specify the requested size.
// Specify a custom paper format
iParameter(iPaperLength, 200)
iParameter(iPaperWidth, 300)

Various

  • iParameter must not be called in the processes of a report created with the report editor.
  • All the parameters supported by this function are not necessarily supported by all the printers.
  • If iParameter is used with a network printer (especially to modify the default parameters of the printer), check whether the computer that performs this operation has the rights to "Manage the printers". Otherwise, the modification will not be performed.
  • The paper tray cannot be changed during the print. In this case, you must perform several prints, each one using a different paper tray.
Reports and Queries

iConfigure and iParameter

Related Examples:
WD Printout Parameters Sample components (WINDEV): WD Printout Parameters
[ + ] This example is used to illustrate the iParameter function.
This function is used to retrieve the different settings defined for a given printer.

The default printer settings can be modified in Windows directly.
Caution, these settings will be used in all your applications.

Managing the network printers:
To modify the default settings of a printer network, make sure that you have the rights for "Managing printers". Otherwise, the modifications made will be ignored.
Component : wd240prn.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Exemplo Icopies
//Exemplo Icopies

PROCEDURE imprime_danf()
iConfigure()
iPreview(ipvZoomPageWidth)//iPreview(ipvZoom100)

//Imprimir Varias Copias
iParameter(iCopies,empresa_parametro_nfe.danf_quantidade_vias)
//Imprimir Varias Copias

iPrintReport(RPT_danf_nfce,gn_id_nota_fiscal)

//Blog Com Video E Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/12/aula-1004-relatorio-39-iparameter-copias.html
https://www.youtube.com/watch?v=nJXf_Oo4adw
De matos
20 Dec. 2016
Impressão Paisagem
//Configuração da Impressora
//Printer Setup
//Configuration de l'imprimante

iParameter(iOrientation,iOrientation_Landscape)
//Imprimir paisagem
//Print landscape
//Imprimer paysage

TablePrint(TABLE_XML_ITENS)

//Blog com Video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/06/windev-curso-relatorio-25-relatorio.html
https://www.youtube.com/watch?v=DFw4MivP1uc
De matos AMARILDO
10 Jun. 2016
IMPRESSORA PADRÃO PAINEL DE CONTROLE DO WINDOWS
//PEGA A IMPRESSORA PADRAO DO WINDOWS

sCurrentPrinter is string = iInfoPrinter() //Impressora Atual

sDefaultPrinter is string = iInfoPrinter(False) // Impressora Padrao do Painel de Controle

sDriverUsadoImpressoraPadrao is string = iInfoPrinter(False,iDriverName) //"winspool"

sNomeImpressoraPadrao is string = iInfoPrinter(False,iPrinterName) //"LX300"

sPortaImpressoraPadrao is string = iInfoPrinter(False,iDeviceName) //"LPT1:"

sListaTodasImpressorasInstaladas is string = iListPrinter() //LX300 CR HP1200 CR FAX CR CutePDF

//IMPORTANTE:

ok_situacao_01 is boolean = iConfigure("HP1200", False) // Mudar para a HP1200

IF ok_situacao_01 = True

Info("Impressora foi alterada com sucesso no painel de controle")

Info("
Printer has been successfully changed on the control panel")

ELSE
Info(ErrorInfo())
END

// OU

ok_situacao_02 is boolean = iConfigure("HP1200", True) // Mudar para a HP1200

IF ok_situacao_02 = True

Info("Impressora foi alterada com sucesso somente enquanto tiver usando o aplicativo windev")

Info("
Printer has been successfully changed only while you are using the WINDEV application")

ELSE
Info(ErrorInfo())
END

//Meu muito obrigado pela ajuda José Jorge Matos (Portugal).
adrianoboller
30 Apr. 2016