Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Utility, proc launching print-file to w2K-prnspool within clip5.2e

Status
Not open for further replies.

wimvan

Programmer
Nov 7, 2002
6
BE
High,

Can someone tell me how I can send a printfile to the Win2K-printerspooler without use of 'NET USE ...'.
The prn-file contains basic printer-codes such as form-feed, linefeed, condensed, bold.
Is there a procedure or a utility (execute with run ...) to do so, without the fact that de Win2K should be put as SHAREABLE ?

Many, many thanks for those who can solve, or willing to solve this.
 
Hi, WinVan

How about

COPY FILE "whatever.txt" TO "lpt1"

Best regards
Jock
 
Jock,

I don't think that will work, what Winvan was looking for is the equivalent of COPY FILE "watever" to \\PC\Printer
This won't work in Clipper or command prompt.

PageScript for allows you to access any network Windows printer and lots of other goodies.
Ian Boys
DTE Systems Ltd
 
Hi, Ian.,

Yep, you're right. I should have read the post more carefully before responding - didn't notice that
wimvan for whatever reason didn't want to NET USE.

Back to lurking ...

Jock
 
Hi,

CA-Clipper Tools has a function called FileCopy()

What I have done is created a "Queue" file by sending the print job to a file first and then copying the "Queue" to a print queue using this function in the format:

FileCopy(<FileName>,<PrintQueueName>)

eg. Filecopy(&quot;Q_123456.prn&quot;,&quot;\\server\printqueue&quot;)

It works

A
 
Artie,
Is that a Novell print queue? By <PrintQueueName> to you mean a shared printer under Windows? If it's the latter then I don't think it works.

There are a lot of Clipper Tools things for networks, but that was when Novell ruled the RJ45 roost, unfortunatly MS does now for many of us which doesn't help much.
Ian Boys
DTE Systems Ltd
 
Yes Bozz, you are absolutely right it doesn't works with Windows queues as I discovered last week, it does work very well with Novell queues though as you suggest.

I am trying to find a workaround for Windows (W2K), the only one I have used in the past that does work is to use Blinker's SwapRunCmd() command and use that to copy the file to a Windows Print Queue. By adding &quot;> NUL&quot; to the end you avoid those irritating messages that &quot;The command has executed sucessfully&quot; or whatever. Unfortunately in W2K it still pops up and messes the display up so you have to do a quick screen refresh after it has executed.

Real PIA stuff I know but.....

Artie
 
Here's cracking a nut with a sledghammer. In the early days of Alaska's Xbase++ I found it too buggy to use generally but it was good at putting things on the print queue. So, instead of printing files I sent them to a directory and the Xbase app then checked the last one was printed by looking in the spool directory and then printed the next one. Still works well. Ian Boys
DTE Systems Ltd
 
Hi,

ArtieCHappie tells that sending a printed-to-hard-disk file, with the filecopy-command to \\server\printque, this is his solution printing in Win2K

Is this really working ? Where can I find a printque-directory on the server ?
Is there another programm still running which scan's for files to be printed ?

Thanks

Wim Vanmaele
 
I use NET USE on Wk2 all the time with no problems.
To switch printers I write a batch file to the C drive
then SwpRunCmd to run the batch file.
By using &quot;set device to print&quot; and &quot;@ say....&quot; the print job spools perfectly.


 
I use a dll from SoftCircuits Programming called binprn
which you call from VB.

The 32 bit version ( binprn32.dll ) takes two parameters,
file and print queue.

e.g.

i = vbSendPrnToPrinter(&quot;areport.txt&quot;, &quot;\\server\queue&quot;)

I wrote a small VB program which I call with swpruncmd()
which takes the two parameters as command line arguments.

I can post the code or send the exe if anyone is
interested.

 
Hello all:

I use FileCopy with CATools and work fine with windows 95/08/ME/2000 but not with Windows XP. I don't know why. Somebody uses Filecopy (CATools) or FOpen(&quot;\\Server\Printer&quot;) method in Windows XP and work it?

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top