Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Print to IP through Novell
Message
De
08/02/2007 16:31:04
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
À
07/02/2007 16:11:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Novell 5.x
Database:
Visual FoxPro
Divers
Thread ID:
01193397
Message ID:
01193877
Vues:
15
I use dirprtclass.prg for it. That's an excellent class for direct printing to an ip or printer name.

You can download it from UT
that's a sample:
xport="\\192.168.0.1\my_printer"
xstr="my sample text"
	   SET PROC TO DIRPRTCLASS.PRG ADDITIVE
*!*	   * Note - CLSHeap.PRG needs to be in your SET PROC list, or part of your project
	   oDirPrt = CREATEOBJ('DirectPrintOutput')
    WITH oDirPrt
	      .PrinterOpen(m.xport) && Arg can be a Win Printer name, port, or a print queue - works with both MSNetwork
*!*	                            && and NetWare queues.  It also works with CAPTUREd or NET USEd printer ports
	      IF .PrinterIsOpen()
	         .DocOpen('MySpool')
	         .DocWrite(m.xstr)
	         .SpoolFile('MySpoolFile.TMP', .T.) && Spool file and delete after printed
	         .DocClose()
	         .PrinterClose()  && close both current job and the printer
	      ELSE
	        DECLARE INTEGER CopyFile IN kernel32;
            	STRING lpSrcFile, STRING lpDstFile, INTEGER bFail
                           CopyFile(m.xfile,m.xport, 0)

	      ENDIF
	   ENDWITH
>I would like to use VFP9 to send a print file to a printer on a Novell network but I'm not sure how.
>
>We have printers with IP addresses and prn & plt files of maps in a folder. Until recently there have been print queues available to use but the IT folks are no longer going to support this. To this point I have been simply copying the files to the queue and all was good.
>
>I've seen DirecktDruck which is nice but I have an interface that allows the user an easier method to choose the maps. How can I use VFP to copy a file to an IP printer?
>
>Thanks
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform