function tt_printer()
The form m_sysdef (=System Settings, 'gear' icon from toolbar) allows to declare your printer(s) for Tool&Task.
If you have more than one printer to be used in Tool&Task, enter them all into the m_sysdef table. This form has a checkbox to set for the default printer you want.
The printer icon from the toolbar opens form m_seleprint, which can be also used to change the current printer. In you programs you may use the command tt_printer() to select one of the defined printers for the printout of this program.
By defining the current printer, some public variables for Tool&Task Graphics are set ttg_common and the font definition ('A' through 'F') is transferred to homerg2.dll. (compare ttg_font())
The example for tt_printer shows where these variables are saved in the printer file.
You can defined init- or exit for each printer in m_sysdef if appropriate. Please enter these strings as bytes represented by two hex chars and divided by a blank
gPrinterInit = 1B 26 6C 38 48 27 38 108 56 72
gPrinterExit = 27, 69
We have totally changed the printing within Tool&Task from FoxPro reports to printing bitmaps created using Tool&Task-Graphic This change started in version 2.78 and will certainly take a while until enabled in all procedures. Do not hesitate do tell us printer problems or programs where you miss the ability of printing.
Global variables for printer
global | contains |
---|---|
gPrinter | name of current printer |
gPrinterInit | string to init printer mode |
gPrinterExit | string to exit printer mode |
gPrintCoords | either 'FULL' =printable area or 'PAGE' |
Parameters:
1 Name of printer***************************** | |
* Tool&Task example program * | |
* tt_printer() * | |
* last compile: 19.02.2022 * | |
***************************** |
gPrinter = ALLTRIM(printers.pname) |
&& name of the printer |
gTTG_PHoriRes = printers.totwidth |
&& width of printable area [pixels] |
gTTG_PVertiRes = printers.totheight |
&& height of printable area |
gTTG_PageX0 = printers.lmargin |
&& left margin of page |
gTTG_PageY0 = printers.tmargin |
&& top margin of page |
gTTG_PageWidth = printers.pwidth |
&& width of page |
gTTG_PageHeight = printers.pheight |
&& height of page |
gTTG_PrintStart = printers.pstart |
&& start ESC sequence |
gTTG_PrintStop = printers.pstop |
&& stop ESC sequence |