Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing ASCII file
Message
De
24/07/2002 07:43:07
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00681753
Message ID:
00681971
Vues:
16
I send printer codes + the file to the printer, with "???". Seems to work fine. Perhaps my download #9991 can, at least, give you some ideas of how to get things done.

Hilmar.

>Hi folks,
>
>I create an ASCII text log file which I want printing out to the default printer (which in my case is a network printer). I've tried using both the rawprint library and also the copyfile() api but can't seem to get either to work. Do I need to send control chars as well ?
>Here is the rawprint test prg I'm using...
>
>cfiletoprt = GETFILE()
>
>Set Classlib To rawprint
>vprdev=CreateObject("PrintDev")
>
>vprdev.cprintername = SET("PRINTER", 3)
>vprdev.cfilename = cfiletoprt
>If vprdev.oOpen()
> if !vprdev.oPrintFile()
> MessageBox("Error sending to printer")
> endif
> vprdev.oClose()
>Else
> MessageBox("OpenPrinter() Error: "+str(oPrnDev.nOpenError))
>Endif
>
>Release vprdev
>Set Classlib to
>
>Not sure what I'm missing. Would be grateful if anyone point me in the right direction.
>
>Regards
>
>Kal
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform