- Modifying the print parameters via constants
- Reinitializing the print module
- Number of copies
- Parameters defined by default
- Custom paper format
- Miscellaneous
- Printing in Java and Android
- iConfigure and iParameter
iParameter (Function) In french: iParamètre 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. This option is not available. Indeed, no window can be displayed on the server. - 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 settings made are reset. Syntax
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 the desired 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.
| | iCollate | Defines how the pages are collated. If this parameter is used, <Result> is a boolean that can hold one of the following values: - 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.
| iColor | Used to find out the management mode of colors. If this parameter is used, <Result> can take one of the following constants as value:
- iColor_Color: Print in color
- iColor_Mono: Grayscale printing
| iCopies | Allows 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.
| iDuplex | Used to find out the parameters for duplex printing. If this parameter is used, <Result> can take one of the following constants as value: - iDuplex_Horizontal: Horizontal duplex printing
- iDuplex_Simple: Single-sided printing
- iDuplex_Vertical: Vertical duplex printing
| iExtraParameters | Shows printer-specific parameters (e.g. if the printer is also a scanner).
| iFormatCustomPaper | Allows 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.
| 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_TransparentFilm: Print on transparent film.
- iMediaType_GlossyPaper: Print on glossy paper.
- iMediaType_PlainPaper: Print on plain paper.
| iOrientation | Allows you to find out the paper orientation. If this parameter is used, <Result> can take one of the following constants as value: - iOrientation_Landscape: Print in landscape mode
- iOrientation_Portrait: Print in portrait mode
| iPaperHeight | Allows you to find out the height of paper used (in tenth of millimeter). In this case, <Result> is an integer.
| iPaperSize | Allows you to find out the paper format used. If this parameter is used, <Result> can take one of the following constants as value: - iPaperSize_10x14: 10 x 14 inch paper
Not available. - iPaperSize_11x17: 11 x 17 inch paper
Not available. - iPaperSize_A3: A3 paper (297 x 420 mm)
- iPaperSize_A4: A4 paper (210 x 297 mm)
- iPaperSize_A4Small: Small A4 paper (210 x 297 mm)
Not available. - iPaperSize_A5: A5 paper (148 x 210 mm)
- iPaperSize_GermanSTD: Fanfold paper (8.5 x 12 inches)
Not available. - iPaperSize_GermanLGL: Fanfold paper (8.5 x 13 inches)
Not available. - iPaperSize_B4: B4 paper (250 x 354 mm)
- iPaperSize_B5: B5 paper (182 x 257 mm)
- iPaperSize_FanfoldUS: Fanfold paper (14.875 x 11 inches)
Not available. - iPaperSize_Envelope9: Envelope #9 (3.875 x 8.875 inches)
- iPaperSize_Envelope10: Envelope #10 (4.125 x 9.5 inches)
- iPaperSize_Envelope11: Envelope #11 (4.5 x 10.375 inches)
- iPaperSize_Envelope12: Envelope #12 (4.5 x 4.5 x 11 inches)
- iPaperSize_Envelope14: Envelope #14 (5 x 11.5 inches)
- iPaperSize_EnvelopeB4: B4 envelope (250 x 353 mm)
- iPaperSize_EnvelopeB5: B5 envelope (176 x 250 mm)
- iPaperSize_EnvelopeB6: B6 envelope (176 x 125 mm)
- iPaperSize_EnvelopeC3: C3 envelope (324 x 458 mm)
Not available. - iPaperSize_EnvelopeC4: C4 envelope (229 x 324 mm)
Not available. - iPaperSize_EnvelopeC5: C5 envelope (162 x 229 mm)
Not available. - iPaperSize_EnvelopeC6: C6 envelope (114 x 162 mm)
Not available. - iPaperSize_EnvelopeC65: C65 envelope (114 x 229 mm)
Not available. - iPaperSize_EnvelopeDL: DL envelope (110 x 220 mm)
Not available. - iPaperSize_EnvelopeItaly: Envelope 110 x 230 mm
- iPaperSize_EnvelopeMonarch: Envelope 3.875 x 7.5 inches
- iPaperSize_EnvelopePerso: Envelope 3.625 x 6.5 inches
- iPaperSize_Executive: Executive paper (7.5 x 10.5 inches)
- iPaperSize_Folio: Folio paper (8.5 x 13 inches)
- iPaperSize_Ledger: Ledger paper (17 x 11 inches)
Not available. - iPaperSize_Legal: Legal paper (8.5 x 14 inches)
- iPaperSize_LetterSmall: Small letter paper (8.5 x 11 inches)
Not available. - iPaperSize_Letter: Letter paper (8.5 x 11 inches)
- iPaperSize_Note: Note paper (8.5 x 11 inches)
- iPaperSize_Quarto: Quarto paper (215 x 275 mm)
- iPaperSize_Statement: Statement paper (5.5 x 8.5 inches)
- iPaperSize_Tabloid: Tabloid paper (11 x 17 inches)
- iPaperSize_CSheet: Size C sheet
Not available. - iPaperSize_DSheet: Size D sheet
Not available. - iPaperSize_ESheet: Size E sheet
Not available.
| iPaperSource | Defines the paper source for the printer. If this parameter is used, <Result> can take one of the following constants as value: - iPaperSource_Auto: Automatic sheet feed
- iPaperSource_Lower: Lower tray paper feed
- iPaperSource_Cassette: Tray paper feed
Not available. - iPaperSource_Envelope: Envelope feed
- iPaperSource_EnvelopeManual: Manual envelope feed
Not available. - iPaperSource_LargeCapacity: Large capacity paper feed
- iPaperSource_LargeFormat: Large format paper feed
Not available. - iPaperSource_Upper: Upper tray paper feed
- iPaperSource_Manual: Manual feed
- iPaperSource_Middle: Middle tray paper feed
- iPaperSource_SmallFormat: Small format paper feed
Not available. - iPaperSource_Tractor: Tractor paper feed
Not available. - iPaperSource_OnlyOne: Only one feed
Not available.
| iPaperWidth | Allows you to find out the width of paper used (in tenth of millimeter). In this case, <Result> is an integer.
| iQuality | Used to find out the parameters for print quality. If this parameter is used, <Result> can take one of the following constants as value: - iQuality_Low: Print in low quality
- iQuality_Draft: Print in draft mode
- iQuality_High: Print in high quality
- iQuality_Medium: Print in medium qualityThe quality of the print can also correspond to the print resolution (300, 600, 1200 or 1600 depending on the printer).
| 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.
| iScale | Allows you to find out the scale used during the print. In this case, <Result> corresponds to an integer. | iTrueType | Allows you to find out the printing parameters for TrueType fonts. If this parameter is used, <Result> can take one of the following constants as value: - iTrueType_Bitmap: True Type font printed in bitmap
- iTrueType_Download: Downloaded TrueType font
- iTrueType_Subdev: TrueType font of device
| iYResolution | Shows vertical resolution (in dots per inch). If this parameter is used, <Result> is an integer. |
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. | | iCollate | Change page assembly mode. 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.
| iColor | Changes the color management mode. If this parameter is used, <Parameter value> can hold one of the following constants: - iColor_Color: Print in color
- iColor_Mono: Grayscale printing
| iCopies | Change the number of copies per Default. In this case, <Parameter value> is an integer. | iDrawTextMultiplatform | Used to change the print algorithm used for printing PDF files. If this parameter is used, <Parameter value> is a boolean that can take for value: - True to use the default PDF print algorithm used in Android. In this case, the limitations are as follows:
- Reports cannot contain edit controls.
- It is not possible to manage the orientation of captions.
- False to use the standard PDF print algorithm.
| iDuplex | Allows you to modify duplex printing parameters. If this parameter is used, <Parameter value> can hold one of the following constants: - iDuplex_Horizontal: Horizontal duplex printing
- iDuplex_Simple: Single-sided printing
- iDuplex_Vertical: Vertical duplex printing
| iExtraParameters | Allows you to modify printer-specific parameters (e.g. if the printer is also a scanner).. If this parameter is used, <Parameter value> must be a buffer.
| iFormatCustomPaper | Allows 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. | 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_TransparentFilm: Print on glossy paper.
- iMediaType_GlossyPaper: Print on glossy paper.
- iMediaType_PlainPaper: Print on plain paper
| iOrientation | Change paper orientation. If this parameter is used, <Parameter value> can hold one of the following constants: - iOrientation_Landscape: Print in landscape mode
- iOrientation_Portrait: Print in portrait mode
This parameter is ignored when printing in PCL format. | iPaperHeight | Allows you to modify the height of paper used (in tenth of millimeter). In this case, <Parameter value> is an integer. | iPaperSize | Allows you to modify the size of paper used. If this parameter is used, <Parameter value> can hold one of the following constants: - iPaperSize_10x14: 10 x 14 inch paper
Not available. - iPaperSize_11x17: 11 x 17 inch paper
Not available. - iPaperSize_A3: A3 paper (297 x 420 mm)
- iPaperSize_A4: A4 paper (210 x 297 mm)
- iPaperSize_A4Small: Small A4 paper (210 x 297 mm)
Not available. - iPaperSize_A5: A5 (148 x 20 mm)
- iPaperSize_GermanSTD: Fanfold paper (8.5 x 12 inches)
Not available. - iPaperSize_GermanLGL: Fanfold paper (8.5 x 13 inches)
Not available. iPaperSize_B4: B4 paper (250 x 354 mm)- iPaperSize_B5: B5 paper (182 x 257 mm)
- iPaperSize_FanfoldUS: Fanfold paper (14.875 x 11 inches)
Not available. - iPaperSize_Envelope9: Envelope #9 (3.875 x 8.875 inches)
- iPaperSize_Envelope10: Envelope #10 (4.125 x 9.5 inches)
- iPaperSize_Envelope11: Envelope #11 (4.5 x 10.375 inches)
- iPaperSize_Envelope12: Envelope #12 (4.5 x 4.5 x 11 inches)
- iPaperSize_Envelope14: Envelope #14 (5 x 11.5 inches)
- iPaperSize_EnvelopeB4: B4 envelope (250 x 353 mm)
- iPaperSize_EnvelopeB5: B5 envelope (176 x 250 mm)
- iPaperSize_EnvelopeB6: B6 envelope (176 x 125 mm)
- iPaperSize_EnvelopeC3: C3 envelope (324 x 458 mm)
Not available. - iPaperSize_EnvelopeC4: C4 envelope (229 x 324 mm)
Not available. - iPaperSize_EnvelopeC5: C5 envelope (162 x 229 mm)
Not available. - iPaperSize_EnvelopeC6: C6 envelope (114 x 162 mm)
Not available. - iPaperSize_EnvelopeC65: C65 envelope (114 x 229 mm)
Not available. - iPaperSize_EnvelopeDL: DL envelope (110 x 220 mm)
Not available. - iPaperSize_EnvelopeItaly: Envelope 110 x 230 mm
- iPaperSize_EnvelopeMonarch: Envelope 3.875 x 7.5 inches
- iPaperSize_EnvelopePerso: Envelope 3.625 x 6.5 inches
- iPaperSize_Executive: Executive paper (7.5 x 10.5 inches)
- iPaperSize_Folio: Folio paper (8.5 x 13 inches)
- iPaperSize_Ledger: Ledger paper (17 x 11 inches)
Not available. - iPaperSize_Legal: Legal paper (8.5 x 14 inches)
- iPaperSize_LetterSmall: Small letter paper (8.5 x 11 inches)
Not available. - iPaperSize_Letter: Letter paper (8.5 x 11 inches)
- iPaperSize_Note: Note paper (8.5 x 11 inches)
- iPaperSize_Quarto: Quarto paper (215 x 275 mm)
- iPaperSize_Statement: Statement paper (5.5 x 8.5 inches)
- iPaperSize_Tabloid: Tabloid paper (11 x 17 inches)
- iPaperSize_CSheet: Size C sheet
Not available. - iPaperSize_DSheet: Size D sheet
Not available. - iPaperSize_ESheet: Size E sheet
Not available.
| iPaperSource | Changes the printer feed mode. If this parameter is used, <Parameter value> can hold one of the following constants: - iPaperSource_Auto: Automatic sheet feed
- iPaperSource_Lower: Lower tray paper feed
- iPaperSource_Cassette: Tray paper feed
Not available. - iPaperSource_Envelope: Envelope feed
- iPaperSource_EnvelopeManual: Manual envelope feed
Not available. - iPaperSource_LargeCapacity: Large capacity paper feed
- iPaperSource_LargeFormat: Large format paper feed
Not available. - iPaperSource_Upper: Upper tray paper feed
- iPaperSource_Manual: Manual feed
- iPaperSource_Middle: Middle tray paper feed
- iPaperSource_SmallFormat: Small format paper feed
Not available. - iPaperSource_Tractor: Tractor paper feed
Not available. - iPaperSource_OnlyOne: Only one feed
Not available.
| iPaperWidth | Allows you to modify the width of paper used (in tenth of millimeter). In this case, <Parameter value> is an integer. | iPrinterDefault | Changes the default printer settings. In this case, <Parameter value> is a boolean: - True to change the default printer settings.
- False to keep the default printer settings.
| iPrinterType | Allows you to modify the printer used. If this parameter is used, <Parameter value> corresponds to one of the printer types recognized by WINDEV Mobile. For more details, see Types of printers recognized by WINDEV Mobile. | iQuality | Used to modify the parameters for print quality. If this parameter is used, <Parameter value> can hold one of the following constants: - iQuality_Low: Print in low quality
- iQuality_Draft: Print in draft mode
- iQuality_High: Print in high quality
- iQuality_Medium: Print in medium quality
| 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.
| iScale | Allows you to modify the percentage of scale used during the print. In this case, <Parameter value> corresponds to an integer. | iTrueType | Allows you to modify printing parameters for True Type fonts. If this parameter is used, <Parameter value> can hold one of the following constants: - iTrueType_Bitmap: TrueType font printed in bitmap
- iTrueType_Download: Downloaded TrueType font
- iTrueType_Subdev: TrueType font of device.
| iYResolution | Modifies vertical resolution (in dots per inch). If this parameter is used, <Parameter value> is an integer. |
<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. Remarks Modifying the print parameters via constants If the printer does not support the requested settings, the returned value will be different from the one passed as parameter. For example, to use the A3 format with a printer that does not support the A3 format:
IF iParameter(iPaperSize, iPaperSize_A3) = False THEN
END
The value passed as 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:
ModeAlimentation is int
ModeAlimentation = iParameter(iPaperSource)
SWITCH ModeAlimentation
CASE iPaperSource_Auto
Info("Alimentation papier : mode automatique")
CASE iPaperSource_Lower
Info("Alimentation papier : bac du bas")
CASE iPaperSource_Cassette
Info("Alimentation papier : bac à cassette")
CASE iPaperSource_Manual
Info("Alimentation papier : manuelle")
CASE iPaperSource_Envelope
Info("Alimentation papier : bac à enveloppe")
CASE iPaperSource_Middle
Info("Alimentation papier : bac du milieu")
CASE iPaperSource_EnvelopeManual
Info("Alimentation papier : enveloppe manuelle")
CASE iPaperSource_OnlyOne
Info("Alimentation papier : une seule feuille")
CASE iPaperSource_SmallFormat
Info("Alimentation papier : petit format")
CASE iPaperSource_LargeCapacity
Info("Alimentation papier : grande capacité")
CASE iPaperSource_Tractor
Info("Alimentation papier : mode tracteur")
CASE iPaperSource_LargeFormat
Info("Alimentation papier : grand format")
CASE iPaperSource_Upper
Info("Alimentation papier est le bac haut")
OTHER CASE
Info(StringBuild("Alimentation papier : %1. " + ...
"Correspond à un paramètre spécifique " + ...
"du driver d'impression.", ModeAlimentation))
END
Miscellaneous - 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), make sure the computer that performs this operation has "Printer management" rights. Otherwise, the modification will not be performed.
- It is not possible to change to another paper tray during the print job. In this case, you must perform several prints, each one using a different paper tray.
Business / UI classification: Neutral code
This page is also available for…
|
|
|