Revision history for KeyPgOpenLpt
Revision [26610]
Last edited on 2023-06-24 13:55:51 by fxm [rewording of short description at page top]Additions:
Open a printer device, using it as if it were file operations.
Deletions:
Additions:
{{fbdoc item="filename" value="examples/manual/fileio/openlpt1.bas"}}%%(freebasic)
{{fbdoc item="filename" value="examples/manual/fileio/openlpt2.bas"}}%%(freebasic)
Dim PrintFileNum as long, RptFileFileNum as long
{{fbdoc item="filename" value="examples/manual/fileio/openlpt.bas"}}%%(freebasic)
Dim As Long FFI, PPO
{{fbdoc item="filename" value="examples/manual/fileio/openlpt2.bas"}}%%(freebasic)
Dim PrintFileNum as long, RptFileFileNum as long
{{fbdoc item="filename" value="examples/manual/fileio/openlpt.bas"}}%%(freebasic)
Dim As Long FFI, PPO
Deletions:
{{fbdoc item="filename" value="examples/manual/fileio/openlpt2.bas"}}%%(freebasic)
Dim PrintFileNum as integer, RptFileFileNum as integer
{{fbdoc item="filename" value="examples/manual/fileio/openlpt.bas"}}%%(freebasic)
Dim As UByte FFI, PPO
Additions:
**Open Lpt** ["[LPT[x]:][//Printer_Name//][,//TITLE=Doc_Title//][,//EMU=TTY//]"] [For Input|Output] [[KeyPgAs|as]] #//filenumber//
**Open Lpt** "LPT..." [[KeyPgAs|as]] [#]//filenumber//
//result// = **Open Lpt**( "LPT..."[,] [[KeyPgAs|as]] [#]//filenumber// )
##//filenumber//##
**Open Lpt** "LPT..." [[KeyPgAs|as]] [#]//filenumber//
//result// = **Open Lpt**( "LPT..."[,] [[KeyPgAs|as]] [#]//filenumber// )
##//filenumber//##
Deletions:
**Open Lpt** "LPT..." [[KeyPgAs|as]] [#]//filenum//
//result// = **Open Lpt**( "LPT..."[,] [[KeyPgAs|as]] [#]//filenum// )
##//filenum//##
Additions:
Additions:
The error code returned by ##**Open Lpt**## can be checked using ##[[KeyPgErr|Err]]## in the next line. The function version of ##**Open Lpt**## returns directly the error code as a 32 bit ##[[KeyPgLong|Long]]##.
Deletions:
Revision [21332]
Edited on 2016-04-06 03:39:31 by fxm [The error code returned can also be checked using Err()]Additions:
The error code returned by ##**Open Lpt**## can be checked using ##[[KeyPgErr|Err]]## in the next line. The function version of ##**Open**## returns directly the error code as a 32 bit ##[[KeyPgLong|Long]]##.
Additions:
A 32 bit ##[[KeyPgLong|Long]]##: ##0## is returned if ##**Open Lpt()**## completed successfully, otherwise a non-zero value is returned to indicate failure.
Deletions:
Additions:
A 32 bit ##[[KeyPgLong|Long]]##: ##0## is returned if ##**Open Lpt**## completed successfully, otherwise a non-zero value is returned to indicate failure.
Deletions:
Additions:
Additions:
**Open Lpt** ["[LPT[x]:][//Printer_Name//][,//TITLE=Doc_Title//][,//EMU=TTY//]"] [For Input|Output] [[KeyPgAs|as]] #//filenum//
**Open Lpt** "LPT..." [[KeyPgAs|as]] [#]//filenum//
//result// = **Open Lpt**( "LPT..."[,] [[KeyPgAs|as]] [#]//filenum// )
##**Open Lpt**## opens a connection to a printer device. The connection is treated like a file, so data may be written to the printer using ##[[KeyPgPrint|Print]]## and ##[[KeyPgPutfileio|Put #]]## commands.
##[[KeyPgLprint|Lprint]]## will automatically try to open the default printer on Windows and Linux, and ##"LPT1:"## on DOS.
Line Input #RptFileFileNum, RptInput
Print #PrintFileNum, RptInput
- In the //[[CompilerOptlang|-lang qb]]// dialect the old syntax is supported OPEN "LPT:..." . This syntax used in the other dialects will open a regular file.
- ##[[KeyPgOpen|Open]]##
- ##[[KeyPgLprint|Lprint]]##
**Open Lpt** "LPT..." [[KeyPgAs|as]] [#]//filenum//
//result// = **Open Lpt**( "LPT..."[,] [[KeyPgAs|as]] [#]//filenum// )
##**Open Lpt**## opens a connection to a printer device. The connection is treated like a file, so data may be written to the printer using ##[[KeyPgPrint|Print]]## and ##[[KeyPgPutfileio|Put #]]## commands.
##[[KeyPgLprint|Lprint]]## will automatically try to open the default printer on Windows and Linux, and ##"LPT1:"## on DOS.
Line Input #RptFileFileNum, RptInput
Print #PrintFileNum, RptInput
- In the //[[CompilerOptlang|-lang qb]]// dialect the old syntax is supported OPEN "LPT:..." . This syntax used in the other dialects will open a regular file.
- ##[[KeyPgOpen|Open]]##
- ##[[KeyPgLprint|Lprint]]##
Deletions:
**Open Lpt** "LPT..." [[KeyPgAs as]] [#]//filenum//
//result// = **Open Lpt**( "LPT..."[,] [[KeyPgAs as]] [#]//filenum// )
##**Open Lpt**## opens a connection to a printer device. The connection is treated like a file, so data may be written to the printer using ##[[KeyPgPrint Print]]## and ##[[KeyPgPutfileio Put #]]## commands.
##[[KeyPgLprint Lprint]]## will automatically try to open the default printer on Windows and Linux, and ##"LPT1:"## on DOS.
Line Input #RptFileFileNum, RptInput
Print #PrintFileNum, RptInput
- In the //[[CompilerOptlang -lang qb]]// dialect the old syntax is supported OPEN "LPT:..." . This syntax used in the other dialects will open a regular file.
- ##[[KeyPgOpen Open]]##
- ##[[KeyPgLprint Lprint]]##
Revision [17581]
Edited on 2015-04-04 06:46:22 by FxMwikki [In function version of OPEN LPT, a comma is not mandatory to separate fields]Additions:
//result// = **Open Lpt**( "LPT..."[,] [[KeyPgAs as]] [#]//filenum// )
Deletions:
Additions:
##0## is returned if ##**Open Lpt**## completed successfully, otherwise a non-zero value is returned to indicate failure.
##**Open Lpt**## opens a connection to a printer device. The connection is treated like a file, so data may be written to the printer using ##[[KeyPgPrint Print]]## and ##[[KeyPgPutfileio Put #]]## commands.
##**Open Lpt**## opens a connection to a printer device. The connection is treated like a file, so data may be written to the printer using ##[[KeyPgPrint Print]]## and ##[[KeyPgPutfileio Put #]]## commands.
Deletions:
**Open Lpt** opens a connection to a printer device. The connection is treated like a file, so data may be written to the printer using ##[[KeyPgPrint Print]]## and ##[[KeyPgPutfileio Put #]]## commands.
Additions:
Any printer attached to the system may be opened with ##**Open Lpt**##
##**Open Lpt** "LPT:" ...## will try to open the default printer on Windows and Linux, and ##"LPT1:"## on DOS.
The argument ##EMU=TTY## assumes printable ASCII or Unicode text, and applies printer driver text imaging to the input. ##EMU=TTY## also allows the usage of CR, LF, BS, TAB, FF, etc., for virtual print-head movement...even when the printer is a GDI printer and therefore doesn't itself understand these special characters. If ##",EMU=TTY"## is omitted, the data must be sent in the printer's language (ESC/P, HPGL, ""PostScript"", etc...). Other useful emulation modes aren't supported yet.
A printer spooler available through ##lp## must be installed to access printers by name or a default printer. Spooler access was tested only with CUPS, but other spoolers may work that are invoked through ##lp##. Port are zero-based on Linux. ##"LPT1:"## corresponds with ##"/dev/lp0"##.
The data must be sent in the printer's language (ESC/P, HPGL, ""PostScript"", etc...). Emulation modes aren't supported yet.
""FreeBASIC"" does not support print spoolers on DOS. Printers must be accessible through ##"LPTx:"##.
The data must be sent in the printer's language (ESC/P, HPGL, ""PostScript"", etc...). Emulation modes aren't supported yet.
##**Open Lpt** "LPT:" ...## will try to open the default printer on Windows and Linux, and ##"LPT1:"## on DOS.
The argument ##EMU=TTY## assumes printable ASCII or Unicode text, and applies printer driver text imaging to the input. ##EMU=TTY## also allows the usage of CR, LF, BS, TAB, FF, etc., for virtual print-head movement...even when the printer is a GDI printer and therefore doesn't itself understand these special characters. If ##",EMU=TTY"## is omitted, the data must be sent in the printer's language (ESC/P, HPGL, ""PostScript"", etc...). Other useful emulation modes aren't supported yet.
A printer spooler available through ##lp## must be installed to access printers by name or a default printer. Spooler access was tested only with CUPS, but other spoolers may work that are invoked through ##lp##. Port are zero-based on Linux. ##"LPT1:"## corresponds with ##"/dev/lp0"##.
The data must be sent in the printer's language (ESC/P, HPGL, ""PostScript"", etc...). Emulation modes aren't supported yet.
""FreeBASIC"" does not support print spoolers on DOS. Printers must be accessible through ##"LPTx:"##.
The data must be sent in the printer's language (ESC/P, HPGL, ""PostScript"", etc...). Emulation modes aren't supported yet.
Deletions:
##**Open Lpt** "LPT:" ...## will try to open the default printer on Windows and Linux, and "LPT1:" on DOS.
The argument EMU=TTY assumes printable ASCII or Unicode text, and applies printer driver text imaging to the input. EMU=TTY also allows the usage of CR, LF, BS, TAB, FF, etc., for virtual print-head movement...even when the printer is a GDI printer and therefore doesn't itself understand these special characters. If ",EMU=TTY" is omitted, the data must be sent in the printer's language (ESC/P, HPGL, PostScript, etc...). Other useful emulation modes aren't supported yet.
A printer spooler available through ##lp## must be installed to access printers by name or a default printer. Spooler access was tested only with CUPS, but other spoolers may work that are invoked through ##lp##. Port are zero based on linux. ##"LPT1:"## corresponds with ##"/dev/lp0"##.
The data must be sent in the printer's language (ESC/P, HPGL, PostScript, etc...). Emulation modes aren't supported yet.
FreeBASIC does not support print spoolers on DOS. Printers must be accessible through ##"LPTx:"##.
The data must be sent in the printer's language (ESC/P, HPGL, PostScript, etc...). Emulation modes aren't supported yet.
Additions:
- ##[[KeyPgOpen Open]]##