Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dot-matrix form feed
Message
De
13/08/2007 06:23:09
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
 
À
10/08/2007 12:26:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01247427
Message ID:
01247761
Vues:
33
You can't bypass windows driver with this type of print. try that:
mytext="Line 1"+Chr(13)+Chr(10)
mytext=mytext+"Line 2"+Chr(13)+Chr(10)
mytext=mytext+"Line 3"+Chr(13)+Chr(10)
mytext=mytext+chr(12) &&------ form feed --------

xport="lpt1"
xfile="myprinter.txt"
StrToFile(mytext,xfile)

DECLARE INTEGER CopyFile IN kernel32;
	STRING lpSrcFile, STRING lpDstFile, INTEGER bFail
CopyFile(m.xfile,m.xport, 0)
>I want to print a report directly to the dot-matrix printer and I want to control the lenght of the print by line feed.
>But when I try to print 2 or more copies even the printer is set to 12"(ex.) the next copy is moved about 2 or 3 lines because of form feed of the windows and after the last copy it prints like an empty page (after SET PRINTER TO).
>
>There is a way to bypass the windows form feed and to control the lenght page by line feed ?
>
>I use a code like :
>
>******************************
>_padvance="linefeed"
>cPrinter = GETPRINTER()
>SET PRINTER TO NAME (cPrinter)
>
>FOR lpage_printing = 1 TO lnbr_pages_to_print
>
> SET PRINTER ON
> SET CONSOLE OFF
> SET PRINTER FONT 'Courier',10
>
> ? "This is the first line"
> ?
> ? "This is the third line"
>
> SET PRINTER OFF
>
>ENDFOR
>
>SET PRINTER TO
>SET CONSOLE ON
>
>*******************************************
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform