DirectPrint printing 4 copies (OpenInsight 32-bit Specific)
At 10 MAR 2005 09:43:24AM David Nicol wrote:
I modified an ARev Report to run in OI using DirectPrint but when I run it, 4 copies are printed.
I'm printing to an HP IIIP and have tried from 2 different W2k Workstations attached to a Netware 6.0 server. Even the simple program below prints 4 copies.
*
Subroutine TestPrinter(Dummy)
Declare Function DirectStart, DirectStop, DirectPrint, DirectPage
Declare Subroutine Msg
retval=DirectStart("","Test report")
If retval 1 Then
Call Msg("","DirectStart Error: " : retval)End
retval=DirectPrint("This is a simple test line!")
retval=DirectPage()
retval=DirectStop()
I also tried to print to a Canon Mulipass L6000 which is attached to one of the W2k Workstations but that gave me a printer fault message perhaps because of the PCL codes I used in the program are not compatible with the Canon.
Has anyone experienced this?
At 10 MAR 2005 06:04PM Warren Auyong wrote:
From CMD/DOS prompt do a "CAPTURE SH" and see what the number of copies are set to.
At 10 MAR 2005 09:28PM David Nicol wrote:
Capture sh show capturing is not active for LPT1 thru 9
At 11 MAR 2005 10:55AM Warren Auyong wrote:
How did you prototype the DLL? I think the help docs says to use LPCHAR. LPSTR seems to work better in OI 7.x.
At 14 MAR 2005 02:09PM David Nicol wrote:
Help. Where do I find the Help docs for DrirectPrint? All I've been able to locate is a file called DirectPrint.txt and it shows the function call as int DirectPrint(LPSTR lpData). I have been formating a variable called PrintLine with all of the line data and using the statement "retval=DirectPrint(PrintLine)" to get the results that seem to work OK.
Dave
At 14 MAR 2005 07:07PM Warren Auyong wrote:
The DirectPrint.txt file is the helps :)
I'm running the eval version so perhaps the txt file has been updated once you get the licensed version. Setting up a Paypal account or getting a check cut from this company is a hassle which is holding up getting a full registered version.
Anyway this is how I prototyped the DLL. The txt file in the eval version said to use LPCHAR instead of LPSTR. When I prototyped it using LPCHAR it did funny things. I had tried the eval copy before in 4.x and the prototype using LPCHAR worked fine.
My current Prototype:
DIRECTPRINT
INT STDCALL DirectStart(LPSTR,LPSTR)
INT STDCALL DirectStop(VOID)
INT STDCALL DirectPrint(LPSTR)
INT STDCALL DirectPrint2(LPSTR)
INT STDCALL DirectPage(VOID)
INT STDCALL DirectAbort(VOID)
INT STDCALL DirectErrorCode(VOID)
At 16 MAR 2005 02:34PM David Nicol wrote:
I changed DLL_Directprint to match what you suggested and when I executed RUN DECLARE_FCNS 'DLL_DIRECTPRINT', I got "Error Invalid Character" on line 2. I set it back to LPCHAR and it ran OK.
At 16 MAR 2005 05:46PM Warren Auyong wrote:
Okay, just got the licensed version from Splaver Soft today. The current prototype for OI v7.x is defined as per documentation:
DIRECTPRINT
INT STDCALL DirectStart(LPASTR,LPASTR)
INT STDCALL DirectStop(VOID)
INT STDCALL DirectPrint(LPASTR)
INT STDCALL DirectPrint2(LPASTR)
INT STDCALL DPrint(LPASTR,INT)
INT STDCALL DirectPage(VOID)
INT STDCALL DirectAbort(VOID)
INT STDCALL DirectErrorCode(VOID)
LPASTR STDCALL DirectVersion(VOID)
INT STDCALL DirectPDisk(LPASTR)
INT STDCALL DirectPrintBin(LPVOID, INT)
I reprotoyped my definition to match this and tested it on a thermal label printer and a HP Laserjet 5 (local) and 4050 on the network. It worked without flaw.
How long ago did you get the DLL? The one I just received is v1.0.0.5. Perhaps you need to contact Tony for an updated version.
At 16 MAR 2005 07:22PM David Nicol wrote:
I'm going to go aead and get the license version now. I did get this version to work by puting the PCL code for # of copies set to 1 and inserted that code in the first DirectPrint call.
Thanks for your help
Dave
At 17 MAR 2005 10:25AM Matt Sorrell wrote:
David,
Just a silly question here, but are you printing to a local printer or a network printer? If you are printing to a network printer, what is the "default number of copies" set to for the capture?
I had a situation similar to this with an ARev system one time, and it was because the user had re-captured LPT1 and set the number of copies to something like 10.
It was very frustrating.