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.
PB 4.xx version.
Functions
LPRINT_OpenPrinter(PrinterName.s)LPRINT_ClosePrinter()Open printer [ex: LPRINT_Open("MyPrinter")] - Returns 0 if failedLPRINT_StartDoc(JobName.s)Close printerLPRINT_EndDoc()Start document printing [ex: LPRINT_StartDoc("MyJob")] (JobName is shown in the printer spooler) - Returns 0 if failedLPRINT_Print(Text.s)End document printingLPRINT_PrintN(Text.s)Print text - Returns 0 if failedLPRINT_PrintData(*MemoryBank, DataLength.l)Print text and adds a new line - Returns 0 if failedLPRINT_NewPage()Send data to printer - Returns 0 if failedLPRINT_GetDefaultPrinter()Form feed [CHR(12)] - Returns 0 if failedLPRINT_GetInstalledPrinters()Get default printer nameGet all installed printers - If there is more than one, the delimiter is ';'