PureLPRINT library

Overview

Provide LPRINT functions with direct access to printer, just like good old BASIC ! (It won't work with GDI only / POSTSCRIPT printers).

You may find the Windows API function CharToOem_() useful to transform strings from ANSI to ASCII.

Functions

LPRINT_OpenPrinter(PrinterName.s)

Open printer [ex: LPRINT_Open("MyPrinter")] - Returns 0 if failed
LPRINT_ClosePrinter()

Close printer
LPRINT_StartDoc(JobName.s)

Start document printing [ex: LPRINT_StartDoc("MyJob")] (JobName is shown in the printer spooler) - Returns 0 if failed
LPRINT_EndDoc()

End document printing
LPRINT_Print(Text.s)

Print text - Returns 0 if failed
LPRINT_PrintN(Text.s)

Print text and adds a new line - Returns 0 if failed
LPRINT_PrintData(*MemoryBank, DataLength.l)

Send data to printer - Returns 0 if failed
LPRINT_NewPage()

Form feed [CHR(12)] - Returns 0 if failed
LPRINT_GetDefaultPrinter()

Get default printer name
LPRINT_GetInstalledPrinters()

Get all installed printers - If there is more than one, the delimiter is ';'