Important:
- This function only concerns Adelia reports.
- In order for this function to set printing parameters, the VaToolBxSetAdeliaPrinter function must have been called from the PrinterNum printer number.
This function is used to set permanently or for the current session the following print parameters for the PrinterNum printer number:
Font,
Orientation,
Paper size,
Tray selection,
Duplex mode,
Number of copies (not managed by the print configuration file).
Context
Windows client,
Adelia Cloud client,
Event Adelia client.
Parameters
NUM_BIN_2 |
PrinterNum |
Number of the printer (from 1 to 9). |
BOOL |
Permanent |
Specifies whether or not the new parameters are taken into account for the current session only (*FALSE) or permanently (*TRUE) (the configuration file will be modified). |
ALPHA |
Font |
e.g. '12.Arial' |
NUM_BIN_2 |
Orientation |
1 = Portrait, 2 = Landscape. |
NUM_BIN_2 |
PaperSize |
Indicates the size of the paper used for the print job. Important: Some parameters may not be valid, depending on the printer used. |
NUM_BIN_2 |
Tray |
Indicates the printer's paper feed source. Important: Some parameters may not be valid, depending on the printer used. |
NUM_BIN_2 |
Duplex |
1=None, 2=Long side, 3=Short side. |
NUM_BIN_4 |
NbCopies |
Number of copies to be printed. |
BOOL |
ReturnCode |
Return code for the operation: *TRUE if the operation was successful. *FALSE if the operation failed. |
Note: The parameters the default value of which is not to be modified (value defined in the configuration file) must be set to –1 (numerical parameters) or *Blank (Alpha parameters).
Adelia Cloud
For previews in PDF format, this function makes it possible to set a TrueType font other than Courier (only font offered in the execution parameters).
The files (.ttf) need to have been copied beforehand:
- either the VFS c:\fonts directory,
- or into the VFS directory pointed at by the PdfFontsPath key if this is configured in the wicfgva.ini configuration file.
The font name is the real name of the .ttx file. If the font is not found, the default font [7.Courier] is used.
If in the rendering of the PDF document the line height (0.85 by default) is too small or too large, it can be adjusted by changing the LineHeightFactor attribute (see the VaToolBxCloudSetSupersededAdeliaPrinterPdfAttributes function).
For example
Example 1:
PrinterNum Permanent Font Orientation PaperSize Tray Duplex NbCopies |
= 1 = *FALSE = '12.Arial' = 1 = 9 = -1 = 2 = 1 |
*sets the parameters for the session (lifetime of the process) *Font *Portrait *A4 *default value defined in the configuration file *Two-sided printing relative to the long side *1 copy only |
CALL_DLL 'VATOOLBX.DLL' 'VaToolBxSetAdeliaPrinterEx' PrinterNum Permanent Font Orientation PaperSize Tray Duplex NbCopies ReturnCode
Example 2:
If the DroidSans.ttf file is present in the c:\fonts directory of the VFS,it is possible to call the function as follows:
BOOL resB
CALL_DLL 'VaToolBx' 'VaToolBxSetAdeliaPrinterEx' 1 *FALSE '8.DroidSans' 1 -1 -1 1 1 resB
The font used for PDF generation is the font DroidSans, size 8.
List of the VaToolBx functions by topic