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