print teks (mode draft terutama -- untuk print cepat);

anda perlu buat 2 file:

1. print.bat

isinya:
type %1 > lpt1

2. print.pif

pif ini semacam shortcut untuk windows. isinya standar
saja yg penting command linenya ke print.bat

script untuk print ke teks file (contoh saja - untuk
kode printer epson):

//////////////////////////////////////////////////////

// limit to 32,766
integer li_FileNum
string  ls_text
string  ls_reset
string  ls_crlf
string  ls_nlq
string  ls_draft
string  ls_condensed, ls_cancel_condesed
string  ls_emphasized, ls_cancel_emphasized

li_FileNum = FileOpen("PRINT001.SCR", StreamMode!,
Write!, LockWrite!, Replace!)

ls_reset             = 'char(27)' + '@' + char(27) +
char(64) // harus pertama 
ls_crlf              = '' // char(10) + char(13)
ls_nlq               = char(27) + 'x1'
ls_draft             = char(27) + 'x0'
ls_condensed         = char(27) + char(15)
ls_cancel_condesed   = char(18)
ls_emphasized        = char(27) + 'E'
ls_cancel_emphasized = char(27) + 'F'

ls_text = ls_reset + ls_draft + 'Text DRAFT' +
ls_condensed + 'condensed' + ls_cancel_condesed +
ls_emphasized + 'EMPHASIZED' + ls_cancel_emphasized +
ls_nlq + 'ANTON GANTENG'

FileWrite(li_FileNum, ls_text) // beware only 32,766
bytes writes at a time.

fileclose(li_FileNum)
///////////////////////////////////////////////////////////////////////


script untuk print :

/////////////////////////////////////////
run("print.pif PRINT001.SCR",minimized!) // nggak bisa
dipisah. kayak "print.bat" + "print001.scr"
//////////////////////////


untuk membuat benar2 teks file plus command2 printer,
anda harus buat langsung ke teks file!; so jgn harap
bisa dipreview WYSIWYG! kalo cuma buat dari dw ke
teks, pake aja driver printer GENERIC TEXT. pasti
hasilnya teks.

berikut adalah command dari printer epson lx300, untuk
kodenya saya sudah translate (ada disebelah kanannya).
command2 tsb lsg bisa ditambahankan ke teks.

auf Wiedersehen.

///////////////////////////////////////////
Printer operation
ASCII Dec. Hex. Description
ESC @ 64 40 Initialize Printer  char(27) + [EMAIL PROTECTED]
DC1 17 11 Select Printer                char(17)
DC3 19 13 Deselect Printer      char(19)
ESC s 1/0 115 73 Turn Half-Speed Mode On/Off    char(27)
+ �s� + �1� | �0�
ESC 60 3C Select Unidirectional Mode (one line)
char(27) + char(60)
ESC U 1 /0 85 55 Turn Unidirectional Mode On/Off
char(27) + �U� + �1� | �0�
ESC 8 56 38 Disable Paper-Out Detection         char(27) +
�8�
ESC 9 57 39 Enable Paper-Out Detection          char(27) + �9�
BEL 7 07 Beeper                                 char(7)
Data control
ASCII Dec. Hex. Description
CR 13 0D Carriage Return                                char(13)
CAN 24 18 Cancel Line                           char(24)
DEL 127 7F Delete Character                     char(127)
Vertical motion
ASCII Dec. Hex. Description
FF 12 0C Form Feed                              char(12)
ESC C n 67 43 Set Page Length in Lines          char(27) + �C�
+ string(n)
n = Number of lines
ESC C 0 n 67 43 Set Page Length in Inches               char(27) +
�C� + �0� + string(n)
n = Number of inches
ESC N n 78 4E Set Skip-Over-Perforation         char(27) +
�N� + string(n)
n = Number of lines
ESC O 79 4F Cancel Skip-Over-Perforation                char(27) +
�O�
LF 10 0A Line Feed                              char(10)
ESC 0 48 30 Select 1/8-inch Line Spacing                char(27) +
�0� 
ESC 1 49 31 Select 7/72-inch Line Spacing               char(27) +
�1�
ESC 2 50 32 Select 1/6-inch Line Spacing                char(27) +
�2�
ESC 3 n 51 33 Select n/216-inch Line Spacing    char(27)
+ �3� + string(n)
ESC A n 65 41 Select n/72-inch Line Spacing     char(27) +
�A� + string(n)
Horizontal motion
ASCII Dec. Hex. Description
ESC l n 108 6C Set Left Margin                  char(27) + �I� +
string(n)
n = Left margin column
ESC Q n 81 51 Set Right Margin                  char(27) + �Q� +
string(n)
n = Right margin column
BS 8 08 Backspace                               char(8)
ESC e 0 n 101 65 Set Horizontal Tab Increments
char(27) + �e� + �0� + string(n)
n = Horizontal tab interval in spaces
(n< 21 at 10 cpi, 25 at 12 cpi, or 36 in
condensed modes)
ESC e 1 n 101 65 Set Vertical Tab Increments    char(27)
+ �e� + 1 + string(n)
n = Vertical tab interval in lines
ESC f 0 n 102 66 Horizontal Skip                        char(27) + �f� +
�0� + string(n)
n = Number of spaces to skip
ESC f 1 n 102 66 Vertical Skip                  char(27) + �f� + �1�
+ string(n)
n = Number of lines to skip
HT 9 09 Tab Horizontally                                char(9) 
ESC D nn 68 44 Set Horizontal Tabs              char(27) + �D� +
string(n)
Up to 32 tabs entered in ascending
order; last n should be 0
A-12 Appendix
Overall printing style
ASCII Dec. Hex. Description
ESC x n 120 78 Select NLQ or Draft      char(27) + �x� +
�1� | �0�
n = 1: NLQ
0: Draft
ESC k n 107 6B Select NLQ Font          char(27) + �k� +
string(n)
n = 0: Roman
1: Sans Serif
ESC ! n 33 21 Master Select     char(27) + �!� + string(n)
To find the value of n, add together
the numbers of the typestyles you
want to combine from the list below:
n = 0: 10 cpi 16: Double-Strike
1: 12 cpi 32: Double-Width
4: Condensed 64: Italic
8: Emphasized 128: Underline
Print size and character width
ASCII Dec. Hex. Description
ESC P 80 50 Select 10 cpi                       char(27) + �P�
ESC M 77 4D Select 12 cpi               char(27) + �M�
SI 15 0F Select Condensed Mode          char(15)
ESC SI 15 0F Select Condensed Mode      char(27) + char(15)
DC2 18 12 Cancel Condensed Mode char(18)
SO 14 0E Select Double-Width Mode (one line)    char(14)
ESC SO 14 0E Select Double-Width Mode (one line)
char(27) + char(14)
DC4 20 14 Cancel Double-Width Mode (one line)   char(20)
ESC W 1/0 87 57 Turn Double-Width Mode On/Off   char(27)
+ �W� + �1� | �0�
Print enhancement
ASCII Dec. Hex. Description
ESC E 69 45 Select Emphasized Mode              char(27) + �E�
ESC F 70 46 Cancel Emphasized Mode              char(27) + �F�
ESC G 71 47 Select Double-Strike Mode           char(27) + �G�
ESC H 72 48 Cancel Double-Strike Mode           char(27) + �H�
Appendix A-13
ASCII Dec. Hex. Description
ESC S0 83 53 Select Superscript Mode            char(27) +
char(83)
ESC S1 83 53 Select Subscript Mode              char(27) +
char(83)
ESC T 84 54 Cancel Superscript/Subscript Mode   char(27)
+ �T�
ESC4 52 34 Select Italic Mode                   char(27) + �4�
ESC 5 53 35 Cancel Italic Mode                  char(27) + �5�
ESC - 1/0 45 2D Turn Underline Mode On/Off      char(27) +
�-� + �1� | �0�
Word processing
ASCII Dec. Hex. Description
ESC a n 97 61 NLQ Justification                 char(27) + �a� + �0�
| �1� | �2� | �3�
n = 0: Left justification
1: Centering
2: Right justification
3: Full justification

Color printing
ASCII Dec. Hex. Description
ESC r n 114 72 Select printing color                    char(27) + �r�
+ �0� | �1� | �2� | �3� | �4� | �5� | �6�
The variable n selects the printing
color according to the table below.
0: Black 4: Yellow
1: Magenta 5: Red
2: Cyan 6: Green
3: Violet

////////////////////////////////////////////////


        
                
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/NhFolB/TM
--------------------------------------------------------------------~-> 

IndoPB - Indonesia PB User Group 
To Post a message, send it to: [EMAIL PROTECTED]
To Unsubscribe,send a blank message to: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indopb/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke