Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: Printing directly to the printer 1998-11-02 -- Wim Nijland Start code ---------------------------------
Program
Map
end
! Sample of how to send escape-sequences to a
! HP-laserprinter, without API or templates
! Also prints to the networkprinter
! V1.0 By W. Nijland, Tested with C4G and C5
! This name receives name of printer
outname CSTRING(256)
RecBufSize EQUATE(256)
OutFile FILE,DRIVER('DOS'),CREATE,NAME(outname)
Record RECORD
Line CSTRING(RecBufSize)
END
END
CODE
outname = '\\Auraws3\hplaserj' ! Name of printer
Create(OutFile)
IF ERRORCODE()
Message(Error())
END
Open(OutFile,11H) ! Deny all, write-only
IF ERRORCODE() THEN
Message(Error())
END
OutFile.Line = 'This is a test in normal font<13,10>'
Append(OutFile, Len(OutFile.Line))
OutFile.Line = '<27>(s3BThis is a bold string<13,10>'
Append(OutFile, Len(OutFile.Line))
OutFile.Line = '<27>&k2SThis is a bold and compressed string<13,10>'
Append(OutFile, Len(OutFile.Line))
OutFile.Line = '<27>(s0B<27>&k0S<27>(s1SThis is a cursive
string<13,10,27>E'
Append(OutFile, Len(OutFile.Line))
Close(OutFile)
------------------------
Simple project for cw4
-- boldout
#noedit
#system win
#model clarion dll
#pragma debug(vid=>full)
#compile "boldout.clw"
#pragma link("C4DOS%X%%L%.LIB")
#link "boldout.exe"
-----------------------
Today is November 21, 2024, 3:48 am This article has been viewed 35215 times.
|
|