I have made a trick like calling this function after I end printing.
FUNCTION CIERRAPRINTER(_port)
SET PRINTER OFF
SET PRINTER TO
SET DEVICE TO SCREEN
SET PRINTER ON
SET PRINTER TO (_port)
SET DEVICE TO PRINTER
SET PRINTER OFF
SET PRINTER TO
SET DEVICE TO SCREEN
Here you have some references to that trouble
http://www.printfil.com/article/clipper-print-windows-printer.htm
Hope it helps
Maurizio
There are two printers models USB
1) USB DOS compatibles. No often.
2) USB Win compatibles (or names GDI printers)
If your printers is 1) you only need to use PrintFileRaw() function and not
need dos2usb program
If your printers is 2) you need dos2usb program
Regards
>My questions are:
>
>- Does Harbour have any native sub-component to support usb based
>windows printers? Please provide links if so, because I could not find
>any.
>- Does harbour have any 16 bit version or compiling mode?
>- Any links to information on printing in harbour project?
>
>Hope someone will help.
>
>With best regards.
>Sanjay.
>
>--
>You received this message because you are subscribed to the Google
>Groups "Harbour Users" group.
>Unsubscribe: harbour-user...@googlegroups.com
>Web: http://groups.google.com/group/harbour-users
I am using a LPT redirection program dos2usb from http://www.dos2usb.com/
Using AMD 3000 plus processor with 512 MB memory. Printer is HP
laserjet 1020.
The problem is that after printing to windows spool, the printing does
not happen till I exit the harbour compiled program. However, using
the clipper compiled version, this does not happen.
Developer of Dos2usb has asked to compile the program in 16 bit,
strangely stating the problem to be of processor speed. He stated that
this problem is not faced in dual core processors, due to their speed.
.......
Hope someone will help.
With best regards.
Sanjay.
But does not harbour have any method to print using Windows print
system instead...bypassing all this print port redirection. I mean, I
myself don't have the capability, but could not the entire dbase print
subsystem be redplaced with one that supported the windows print
drivers. Or am I wrong?
Actually I think most people are already using xp & 32 bit processors.
I know I am using Centos 5.5 with core 2 machines. For people, its not
from the need to upgrade, but mostly from not getting parts of older
machines. But being small businesses they find their customized dbase
programs still effective. Of course, many migrated to windows based
programs when India migrated to VAT from Sales Tax.
One guy I know is still using a 386 machine, wordstar etc. And he has
the added benefit that he never gets viruses anymore....viruses have
all upgraded to xp ;-) Of course, he still lives in the dark ages...no
Internet & so on.
Sanjay.
Can you please provide a link to component for pdf generation? or
maybe some sample code?
I already create a txt file & print it on dot matrix printer, but need
something for normal & compressed or 132 column printing on windows
printers. Don't need fonts though, if I can print compressed without
fonts). My need is to print output for 132 column dot matrix to
windows A4 in compressed.
I hope your pdf link/code can be a solution for me.
Thanks for ving your input.
With best regards.
Sanjay.
2011/2/4 Clippero <clip...@gmail.com>:
Best regards
Maurizio
El 04/02/2011 05:29 p.m., Sanjay Arora escribi�:
> Thanks Fermin
>
> Can you please provide a link to component for pdf generation? or
> maybe some sample code?
>
> I already create a txt file& print it on dot matrix printer, but need
> something for normal& compressed or 132 column printing on windows
> printers. Don't need fonts though, if I can print compressed without
> fonts). My need is to print output for 132 column dot matrix to
> windows A4 in compressed.
>
> I hope your pdf link/code can be a solution for me.
>
> Thanks for ving your input.
>
> With best regards.
> Sanjay.
>
>
> 2011/2/4 Clippero<clip...@gmail.com>:
>> En Clipper o Dbase se imprim�a solo a puertos LPT
>> Cuando aparecieron las impresoras USB la soluci�n pod�a ser usar
>> programas externos que recibieran la impresi�n dirigida al LPT y la re-
>> enviaban por Windows al USB.
>> Recordemos que para llegar al USB desde DOS hab�a que usar algo entre
>> medio tambien.
>>
>> La soluci�n para no tener que depender de programas externos es hacer
>> un NET USE y mapear el puerto LPT a la impresora conectada en el
>> puerto USB (obviamente tiene que estar compartida)
>>
>> NET USE LPT1 \\192.168.10.1\impresora_usb
>>
>> Con esto se lograba imprimir desde Clipper o desde una ventana de DOS
>> a la impresora mapeada en el LPT1, aunque dicha impresora fuera USB
>>
>> Lamentablemente no todas las impresoras logran imprimir con esta
>> forma, algunas HP o SAMSUNG no imprimian nada aunque estuvieran
>> mapeadas en el puerto LPT
>>
>> Algunos modelos traen un driver (buscar en la p�gina del fabricante)
>> que permite la instalaci�n de dicha impresora USB para DOS de esta
>> manera llegar�amos a ellas simplemente imprimiendo al puerto LPT
>>
>> Si no se necesitaran tipos de letras (fonts) y se pudiera imprimir en
>> texto plano, se puede instalar la impresora como Generica solo Texto y
>> ahi las impresiones saldr�an siempre.
>> Otra forma es generar los listados en un archivo .txt y luego correr
>> por dentro un RUN NOTEPAD archivo.txt /P
>>
>> Hoy en d�a en Harbour se pueden hacer muchas cosas, a mi la que mas me
>> gusta es generar un archivo .pdf y luego usar alg�n programa que
>> abra .pdf para imprimir.
>> Por ejemplo, yo con mis listados genero un .pdf, luego hago RUN
>> archivo.pdf se ejecuta el programa por defecto que abre los
>> archivos .pdf (FOXIT.EXE, ADOBEREADER.EXE, ETC)
>> Y una vez en el programa para pdf adem�s de tener una vista previa de
>> mi listado, administro las impresiones, no tengo limitaci�n alguna
>> sobre las impresoras, cantidad de hojas, margenes, tipo de hoja, etc.
>> etc.
>> Si solo quisiera imprimir sin abrir nada hago RUN FOXIT archivo.pdf /p
>> y en al impresora por defecto saldr�a impreso el contenido del
>> archivo.pdf, (tambien se puede enviar la impresi�n a otra impresora y
>> no a la predeterminada)
>>
>> Esto sirve para cualquier windows en el que corra un programa que
>> abra .pdf
>>
>> Cualquier duda a las ordenes.
>>
>> Ferm�n ;-)