Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Lprinting printer control codes?
#9
@Pete escape codes are said not to work anymore, as the old QBASIC ones were basically codes for DOS systems (much like PEEK and POKE addresses). Those old codes simply don't match modern systems.

That said, most printer manufacturers have distinct codes to control things (and many are customizable). All QB64 basically does is send a steam of information to the printer, and then the printer deals with it, according to it's own software. Your printer might want control codes to be formated as "/x1b/x0d/x0a" for a CRLF sequence. Then again, it might be "/027/013/010" or CHR$27) + CHR$(13) + CHR$(10) or even something else. Every printer I've experimented with over the years was different.

Instead of banging my head against a wall and trying to sort out something which isn't multi-system compatible, I've found it just easier to use _PRINTIMAGE. Format and preview what I want on the screen, then simply print the screen. Works no matter where I go, and I don't have to rewrite my code every few years when I buy a new printer (which seems cheaper than buying the ink refills for one anymore!).

Mt HP printer, for instance, works with these PCL3 codes: https://www.pclviewer.com/resources/reference/
Reply


Messages In This Thread
Lprinting printer control codes? - by arnoldhf - 08-03-2022, 08:03 PM
RE: Lprinting printer control codes? - by Pete - 08-03-2022, 10:53 PM
RE: Lprinting printer control codes? - by Pete - 08-03-2022, 11:52 PM
RE: Lprinting printer control codes? - by Pete - 08-04-2022, 12:06 AM
RE: Lprinting printer control codes? - by SMcNeill - 08-04-2022, 12:21 AM
RE: Lprinting printer control codes? - by Pete - 08-04-2022, 12:39 AM
RE: Lprinting printer control codes? - by Pete - 08-04-2022, 02:34 AM



Users browsing this thread: 5 Guest(s)