Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Matricial printers and net
Message
De
04/03/2015 18:29:12
 
 
À
04/03/2015 17:11:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01616239
Message ID:
01616245
Vues:
39
>Hi friends
>
>I was happy when I got a matricial printer did what I wanted it to do with this instructions
>
>SET PRINTER TO FILE file.txt
>
>@ n,n say 'something'
>
>SET PRINTER TO
>
>COPY FILE file.txt TO LPTn.DOS
>
>And I drawed a winning smile at my client: Do yo want to star using my new system? Because I tested and worked fine.
>
>But when I did the first test in a net PC which doesn't have the printer directly connected, matricial printer bursted out laughing.
>
>Does anyone know any other great trick?

Assuming the printer is connected to a computer "ServerName", and it's available using a share name "MatrixPrinter", then on your workstation you can redirect your LPTn printer port to that share:
REM From a CMD prompt run
NET USE LPTn \\ServerName\MatrixPrinter /persistent:y
Also, depending on how print jobs are spooled you may notice a 15 second delay between your COPY command and the start of the print job. This can be reduced by adjusting a registry key LPT_timeout: https://technet.microsoft.com/en-us/library/cc959496.aspx . These days, with fast computers 2 seconds is probably a safe value.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform