Hi,
I downloaded the PureLprint library. The testprogram runs but nothing is printed. It is as the printer is willing to start but it doesn't. A simple text with notepad prints.
Version of PureBasic is 4.1 -OS is XP - printer is Lexmark Z640.
THe program doesn't give any error message and the printerdriver thinks it printed.
Any suggestions?
THanks
Richard
purelprint
-
gnozal
- PureBasic Expert

- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
Re: purelprint
You mean this test program ?t57042 wrote:Hi,
I downloaded the PureLprint library. The testprogram runs but nothing is printed. It is as the printer is willing to start but it doesn't. A simple text with notepad prints.
Version of PureBasic is 4.1 -OS is XP - printer is Lexmark Z640.
THe program doesn't give any error message and the printerdriver thinks it printed.
Any suggestions?
Code: Select all
OpenConsole()
MyPrinter.s = LPRINT_GetDefaultPrinter()
If LPRINT_OpenPrinter(MyPrinter)
Debug "Open " + MyPrinter
PrintN("Open " + MyPrinter)
If LPRINT_StartDoc("MyJob")
LPRINT_Print(Chr(27) + "E") ; PCL reset for HP Printers
LPRINT_Print("Line 1")
LPRINT_PrintN("Same Line")
LPRINT_PrintN("Line 2")
LPRINT_PrintN("")
LPRINT_PrintN("Line 4")
LPRINT_NewPage() ; Form feed
LPRINT_Print("Line 1 (Page 2)")
LPRINT_EndDoc()
Else
Debug "Could not start job"
PrintN("Could not start job")
EndIf
LPRINT_ClosePrinter()
Debug("Done!")
PrintN("Done!")
Else
Debug "Printer " + MyPrinter + " not found"
PrintN("Printer " + MyPrinter + " not found")
EndIf
CloseConsole()Code: Select all
LPRINT_Print(Chr(27) + "E") ; PCL reset for HP PrintersPS : do you use the correct userlib version (PureLPRINT-PB410-Installer.exe for PB4.10) ?
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Hi gnozal,
I reduced the testprogram to the minimum:
MyPrinter.s = LPRINT_GetDefaultPrinter()
If LPRINT_OpenPrinter(MyPrinter)
Debug "Open " + MyPrinter
If LPRINT_StartDoc("MyJob")
LPRINT_Print("Line 1")
LPRINT_PrintN("Same Line")
LPRINT_PrintN("Line 2")
LPRINT_PrintN("")
LPRINT_PrintN("Line 4")
LPRINT_NewPage() ; Form feed
LPRINT_Print("Line 1 (Page 2)")
LPRINT_EndDoc()
Else
Debug "Could not start job"
EndIf
LPRINT_ClosePrinter()
Debug("Done!")
Else
Debug "Printer " + MyPrinter + " not found"
EndIf
It does not work with or without the ESC E line.
I don't know if the Lexmark z640 is HP compatible.
The testprogram acts as if it printed. But all it does is a carriage return.
Richard
I reduced the testprogram to the minimum:
MyPrinter.s = LPRINT_GetDefaultPrinter()
If LPRINT_OpenPrinter(MyPrinter)
Debug "Open " + MyPrinter
If LPRINT_StartDoc("MyJob")
LPRINT_Print("Line 1")
LPRINT_PrintN("Same Line")
LPRINT_PrintN("Line 2")
LPRINT_PrintN("")
LPRINT_PrintN("Line 4")
LPRINT_NewPage() ; Form feed
LPRINT_Print("Line 1 (Page 2)")
LPRINT_EndDoc()
Else
Debug "Could not start job"
EndIf
LPRINT_ClosePrinter()
Debug("Done!")
Else
Debug "Printer " + MyPrinter + " not found"
EndIf
It does not work with or without the ESC E line.
I don't know if the Lexmark z640 is HP compatible.
The testprogram acts as if it printed. But all it does is a carriage return.
Richard
-
gnozal
- PureBasic Expert

- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
The library sends data directly to the printer, in 'raw' mode. Maybe your Lexmark printer needs some extra command [like the HP PCL escape commands].t57042 wrote:Hi gnozal,
I reduced the testprogram to the minimum:
..
It does not work with or without the ESC E line.
I don't know if the Lexmark z640 is HP compatible.
The testprogram acts as if it printed. But all it does is a carriage return.
Sorry I can't help more.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
