Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Printing to a Generic Text Printer
Message
De
16/09/2011 08:36:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01523715
Message ID:
01523723
Vues:
37
You're welcome. Actually it's very easy to create this file, since you can just change the SET PRINTER line to specify the file.

>Thanks a lot Tore
>
>>The thing is that Windows want to be smart, which in this case is not so smart, to put it that way. What I do, is first "print" to a text file, and then copy the file to printer, COPY FILE MyFile.TXT TO LPT1:
>>
>>>Hi
>>>
>>>
>>>We are trying to print directly to Zebra label printer using the ZPL language.
>>>
>>>We’re using a VFP9 System and i am trying to use values from the database in the output.
>>>
>>>At present the code i am using looks like this:
>>>
>>>SET PRINTER TO DEFAULT
>>>
>>>??? ' ^xa'
>>>
>>>??? ' ^lh30,80'
>>>
>>>??? ' ^FO20,10^AS,90,90^FDfoxprofield^FS'
>>>
>>>??? ' ^FO20,110^AS,35^FDfoxprofield^FS'
>>>
>>>??? ' ^FO20,160^AS,35^FDfoxprofield^FS'
>>>
>>>??? ' ^FO20,210^AS,35^FDfoxprofield^FS'
>>>
>>>??? ' ^FO20,260^AS,35^FDfoxprofield^FS'
>>>
>>>??? ' ^FO20,400^AS,35^FDfoxprofieldY^FS'
>>>
>>>??? ' ^FO20,480^AS,90,90^FDfoxprofield^FS'
>>>
>>>??? ' ^FO120,650^BC,60^FDfoxprofield^FS'
>>>
>>>??? ' ^XZ'
>>>
>>>However this does not do anything! (please note the text “foxprofield” is dummy and just an example.
>>>
>>>The printer is installed as a generic/text printer and also will print when using notepad.
>>>
>>>Where are we going wrong? How do we force VFP9 to write to the printer using the correct method?
>>>
>>>When coding this in notepad it looks like this:
>>>
>>>^xa
>>>
>>>^lh30,80
>>>
>>>^FO20,10^AS,90,90^FDfoxprofield^FS
>>>
>>>^FO20,110^AS,35^FDfoxprofield^FS
>>>
>>>^FO20,160^AS,35^FD1foxprofield^FS
>>>
>>>^FO20,210^AS,35^FDfoxprofield^FS
>>>
>>>^FO20,260^AS,35^FDfoxprofield^FS
>>>
>>>^FO20,400^AS,35^FDfoxprofield^FS
>>>
>>>^FO20,480^AS,90,90^FDfoxprofield^FS
>>>
>>>^FO120,650^BC,60^FDfoxprofield^FS
>>>
>>>^XZ
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform