sending_20raw_20data_20to_20a_20printer
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
sending_20raw_20data_20to_20a_20printer [2018/03/31 13:19] – external edit 127.0.0.1 | sending_20raw_20data_20to_20a_20printer [2024/01/05 00:21] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
=====Sending raw data to a printer===== | =====Sending raw data to a printer===== | ||
- | //by Richard Russell, December 2006//\\ \\ Normally BBC BASIC for Windows outputs to a printer using the Windows printer drivers. This is useful in presenting a uniform interface; you don't have to concern yourself with the particular manufacturer and model of printer. To change the font you can use ***PRINTERFONT** and to output graphics you can use ***HARDCOPY** (or the [[/ | + | //by Richard Russell, December 2006//\\ \\ Normally BBC BASIC for Windows outputs to a printer using the Windows printer drivers. This is useful in presenting a uniform interface; you don't have to concern yourself with the particular manufacturer and model of printer. To change the font you can use ***PRINTERFONT** and to output graphics you can use ***HARDCOPY** (or the [[/ |
+ | |||
+ | <code bb4w> | ||
DEF PROCprintraw(S$) | DEF PROCprintraw(S$) | ||
LOCAL P% | LOCAL P% | ||
Line 9: | Line 11: | ||
SYS " | SYS " | ||
ENDPROC | ENDPROC | ||
- | This routine sends a character string directly to the current printer, bypassing the drivers.\\ \\ To use the routine you must first output at least one conventional character to the printer, for example a space, to initialise it. For example you might use the code below to send data to a printer which accepts Hewlett Packard PCL5 commands:\\ \\ | + | </ |
+ | |||
+ | This routine sends a character string directly to the current printer, bypassing the drivers.\\ \\ To use the routine you must first output at least one conventional character to the printer, for example a space, to initialise it. For example you might use the code below to send data to a printer which accepts Hewlett Packard PCL5 commands: | ||
+ | |||
+ | <code bb4w> | ||
VDU 2,1,32,3 | VDU 2,1,32,3 | ||
PROCprintraw(CHR$27+"& | PROCprintraw(CHR$27+"& | ||
VDU 2,1,12,3 | VDU 2,1,12,3 | ||
+ | </ | ||
+ | |||
This code first sets a top margin then selects a 24-point Times font before printing the string **Hello world!** | This code first sets a top margin then selects a 24-point Times font before printing the string **Hello world!** |
sending_20raw_20data_20to_20a_20printer.1522502381.txt.gz · Last modified: 2024/01/05 00:16 (external edit)