1. Re: Faster Printer

George:

  Here is some code to play with the OkiData printer I can not
  test it because I don't have that printer to try it on.


-- < CODE BEGINS > --


-- OKIDATA MICROLINE Standard Commands
global constant
Backspace = {8}
,Carriage_Return = {13}
,Character_Pitch_10 = {30} -- cpi
,Character_Pitch_12 = {28} -- cpi
,Character_Pitch_15 = {27,103} -- cpi
,Character_Pitch_17_1 = {29} -- cpi
,Character_Pitch_20 = {27,35,51} -- cpi
,Character_Set_Standard = {27,33,48}
,Character_Set_lock_Graphic = {27,33,49}
,Character_Set_Line_Graphics = {27,33,50}
,Character_Set_Publisher = {27,33,90}
,Slashed_Zero = {27,33,64}
,Unslashed_Zero = {27,33,65}
,Double_Height_On = {27,31,49}
,Double_Height_Off = {27,31,48}
,Double_Width_Printing = {31}
,Emphasized_Printing_On = {27,84}
,Emphasized_Printing_Off = {27,73}
,Form_Feed = {12}
,Horizontal_Tab = {9}
,Italic_On = {27,33,47}
,Italic_Off = {27,33,42}
,LineFeed_With_Carriage_Return = {10}
,LineFeed_WithOut_Carriage_Return = {27,18}
,LineFeed_N_Divided_By_144 = {27,37,53} -- ***** (append to command - 0 to 127)
,Reverse = {27,10}
,Set_Spacing_to_1_6_inch = {27,54}
,Set_Spacing_to_1_8_inch = {27,56}
,Set_Spacing_N_Divided_By_144 = {27,37,57} -- ***** (append to command - 0 to
127)
,SkipOver_Perforation_third_inch = {27,71} -- ***** (append to command - 1 to 9)
,SkipOver_Perforation_Default = {27,37,83,48}
,Superscript_Printing_On = {27,7,4}
,Superscript_Printing_Off = {27,75}
,Underline_Printing_On = {27,67}
,Underline_Printing_Off = {27,68}
,Uni_Directional_Print_On = {27,45}
,Uni_Directional_Print_Off = {27,61}
,Vertical_Tab = {11}
,Paper_Out_Sensor_Off = {27,69,49}
,Paper_Out_Sensor_On = {27,69,48}
,Select_HSD_SSD = {27,35,48}
,Select_NLQ_Courier = {27,49}
,Select_NLQ_Gothic = {27,51}
,Select_Utility = {27,48}
,PrintSpeed_Full = {27,62}
,PrintSpeed_Half = {27,60}
,PrintSuppress_On = {19}
,PrintSuppress_Off = {17}
,Proportional_Printing_On = {27,89}
,Proportional_Printing_Off = {27,90}
,Reset_Clear_Print_Buffer = {24}
,Shift_In = {15}
,Shift_Out = {14}
,Software_I_Prime = {27,125,0}
,Subscript_Printing_On = {27,76}
,Subscript_Printing_Off = {27,77}

atom printer
printer = -1
-- you may be able to use the printer with windows
-- by windows device number. w32openfile
printer = open("PRN","ub")
if printer = -1 then
  puts(1,"can't open printer\n")
end if


global
procedure PRINT_CMD( sequence cmd )
--
for i = 1 to length(cmd) do
  print(printer,cmd[i])
end for
--
end procedure


-- to send cmds to printer

PRINT_CMD( Uni_Directional_Print_Off )
PRINT_CMD( PrintSpeed_Full )

-- *NOTE* the 3 commands with -- ***** (append to command -
-- will have to have a value append to command
-- for example appending value of 127 to this command.

PRINT_CMD( LineFeed_N_Divided_By_144 & 127 )


-- < CODE ENDS > --





Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu