INSTRUCTIONS FOR PrinterCTRL VERSION: 1.00 July 1992 ===================================================== Contents -------- O. Installation I. Description II. Overview of major features III. Functions IV. Miscellaneous V. Compiling Source VI. Credits O. Installation ---------------- The only installation requirement is that the 'req.library'(version 2.0 or greater) exists in the LIBS: assigned directory. I have included this file in it's original archive and have abided by the copyright of the authors by including their complete archive in the directory 'ReqLibs' You can simply copy the 'req.library' file as follows: From a Shell window, CD to directory in which files were decompressed. eg. CD RAM: Copy the 'req.library' file to LIBS: eg. COPY RAM:ReqLibs/req.library LIBS: You might also want to make sure that the proper printer driver is selected in Preferences as PrinterCTRL uses the selected driver to perform some of it's operations. PrinterCTRL can be run from a CLI window (it detaches itself to run in the background) or from an icon on the workbench. Have fun and READ THE DOCS. I. DESCRIPTION --------------- PrinterCTRL is a WB1.3/2.0 compatible interface program for parallel printers with some uses for those using serial printers. The program allows the user to quickly send predefined or custom printer driver codes to the printer. There are hundreds of printers on the market, each one unique in some fashion. They all come with these little spiral bound books full of printer codes and commands that almost no one has ever used. I always uses these two compressed pitch fonts on my RAVEN PR-2417 (EpsonQ) and it is simpler to send the proper code to the printer than to have to take it offline play with some buttons and put it back on line. Did I mention that I had to get out of my chair! Now all I have to do it startup PrinterCTRL, select gadget 'HEX' and type directly from my printer manual: 1B,50,01 <- Compressed Pitch Program will even tell you if your printer is offline or out of paper which is useful if the printer is in another room. As well as sending RAW hex codes you are also able to send commands directly to the printer.device. These decimal codes correspond to a predetermined action by the printer. A complete list follows. Note that not all commands may be supported by the driver that you are using. eg. 'RLF' reverse line feed is a valid command but my printer does not respond. In that event a error message will be generated on the title bar. II. Overview of major features ------------------------------- There are 26 gadgets on the PrinterCTRL window. The top 24 gadgets all send device driver codes to the printer.device. The only exception is 'BELL' which sends 07 to the printer in RAW format. After you release any gadget the status gadget will update the current condition of the parallel port and then will attempt to send your command to the printer. If everything proceeds properly, the title bar will display your last command and either Ok! or ERROR! In the case of error it is usually an invalid driver command or a file not found by the PRINT command. The program open both the parallel.device and the printer.device as they are required. That is, only to send the commands and check parallel status. When you are not sending a function, both these devices are closed. BTW, these devices are not both opened at the same time...seems they can't be. Added is the ability to send a file to the printer. By selecting the 'PRINT FILE' gadget you can send the contents of the file to the printer which you have preconfigured with you desired options. You may also use this program to send commands to the printer so that another program may properly use a certain option available to your printer. III. Functions -------------- The following is a list of allowable printer driver commands which are selected by using the predefined or the 'CMD' gadget. I do not have support for those functions that take parameters. It is better to look up the proper HEX code in you printer manual and send that command instead (parameters are supported there). eg. To turn off Skip perforation -> 'CMD' 59 To turn on underline -> 'CMD' 8 aRIS 0 ESCC reset ISO aRIN 1 ESC#1 initialize +++ aIND 2 ESCD lf ISO aNEL 3 ESCE return,lf ISO aRI 4 ESCM reverse lf ISO aSGR0 5 ESC[0m normal char set ISO aSGR3 6 ESC[3m italics on ISO aSGR23 7 ESC[23m italics off ISO aSGR4 8 ESC[4m underline on ISO aSGR24 9 ESC[24m underline off ISO aSGR1 10 ESC[1m boldface on ISO aSGR22 11 ESC[22m boldface off ISO aSFC 12 SGR30-39 set foreground color ISO aSBC 13 SGR40-49 set background color ISO aSHORP0 14 ESC[0w normal pitch DEC aSHORP2 15 ESC[2w elite on DEC aSHORP1 16 ESC[1w elite off DEC aSHORP4 17 ESC[4w condensed fine on DEC aSHORP3 18 ESC[3w condensed off DEC aSHORP6 19 ESC[6w enlarged on DEC aSHORP5 20 ESC[5w enlarged off DEC aDEN6 21 ESC[6"z shadow print on DEC (sort of) aDEN5 22 ESC[5"z shadow print off DEC aDEN4 23 ESC[4"z doublestrike on DEC aDEN3 24 ESC[3"z doublestrike off DEC aDEN2 25 ESC[2"z NLQ on DEC aDEN1 26 ESC[1"z NLQ off DEC aSUS2 27 ESC[2v superscript on +++ aSUS1 28 ESC[1v superscript off +++ aSUS4 29 ESC[4v subscript on +++ aSUS3 30 ESC[3v subscript off +++ aSUS0 31 ESC[0v normalize the line +++ aPLU 32 ESCL partial line up ISO aPLD 33 ESCK partial line down ISO aFNT0 34 ESC(B US char set or Typeface 0 (default) aFNT1 35 ESC(R French char set or Typeface 1 aFNT2 36 ESC(K German char set or Typeface 2 aFNT3 37 ESC(A UK char set or Typeface 3 aFNT4 38 ESC(E Danish I char set or Typeface 4 aFNT5 39 ESC(H Sweden char set or Typeface 5 aFNT6 40 ESC(Y Italian char set or Typeface 6 aFNT7 41 ESC(Z Spanish char set or Typeface 7 aFNT8 42 ESC(J Japanese char set or Typeface 8 aFNT9 43 ESC(6 Norweign char set or Typeface 9 aFNT10 44 ESC(C Danish II char set or Typeface 10 Suggested typefaces are: 0 - default typeface. 1 - Line Printer or equiv. 2 - Pica or equiv. 3 - Elite or equiv. 4 - Helvetica or equiv. 5 - Times Roman or equiv. 6 - Gothic or equiv. 7 - Script or equiv. 8 - Prestige or equiv. 9 - Caslon or equiv. 10 - Orator or equiv. aPROP2 45 ESC[2p proportional on +++ aPROP1 46 ESC[1p proportional off +++ aPROP0 47 ESC[0p proportional clear +++ aTSS 48 ESC[n E set proportional offset ISO aJFY5 49 ESC[5 F auto left justify ISO aJFY7 50 ESC[7 F auto right justify ISO aJFY6 51 ESC[6 F auto full justify ISO aJFY0 52 ESC[0 F auto justify off ISO aJFY3 53 ESC[3 F letter space (justify) ISO (special) aJFY1 54 ESC[1 F word fill(auto center) ISO (special) aVERP0 55 ESC[0z 1/8" line spacing +++ aVERP1 56 ESC[1z 1/6" line spacing +++ aSLPP 57 ESC[nt set form length n DEC aPERF 58 ESC[nq perf skip n (n>0) +++ aPERF0 59 ESC[0q perf skip off +++ aLMS 60 ESC#9 Left margin set +++ aRMS 61 ESC#0 Right margin set +++ aTMS 62 ESC#8 Top margin set +++ aBMS 63 ESC#2 Bottom marg set +++ aSTBM 64 ESC[Pn1; Pn2r T&B margins DEC aSLRM 65 ESC[Pn1; Pn2s L&R margin DEC aCAM 66 ESC#3 Clear margins +++ aHTS 67 ESCH Set horiz tab ISO aVTS 68 ESCJ Set vertical tabs ISO aTBC0 69 ESC[0g Clr horiz tab ISO aTBC3 70 ESC[3g Clear all h tab ISO aTBC1 71 ESC[1g Clr vertical tabs ISO aTBC4 72 ESC[4g Clr all v tabs ISO aTBCALL 73 ESC#4 Clr all h & v tabs +++ aTBSALL 74 ESC#5 Set default tabs +++ aEXTEND 75 ESC[Pn"x extended commands +++ aRAW 76 ESC[Pn"r Next 'Pn' chars are raw +++ By far the most powerful use of this program is to send RAW printer codes to your printer. If you don't have or have lost your printer manual this function becomes almost useless. :) You start by selecting the 'HEX' gadget and then inputting your codes. These codes are printer specific and you must use your manual for reference. The codes must be 2 digit hex codes with or without a leading 0x (hex is assumed). And they can be separated by a space, comma or both. You may have up to 10 codes on a single input line. eg. To ring the Bell -> 'BELL' or 'HEX' 07 (works on most printers) eg. 1/180 inch reverse direction paper feed -> 'HEX' 1B 6A FF or -> 'HEX' 1b,6a,ff ^- (specific to LQ-2500 printers) or -> 'HEX' 1b, 6A ,Ff or -> 'HEX' 0x1B 0x6A 0xFF The 'HEX' function will not return an error message if the operation is invalid. Be aware of some codes dumping the buffer contents of the printer to your page as it performs your new command. Performing a line feed 'LF' or 'CMD' 3 causes the buffer to be printed and then the line feed occurs. This may seem buggy if you just want to advance your paper. To be on the safe side you may perform a reset 'RST' which will flush the printer's buffer to oblivion. IV. Miscellaneous ------------------ Upcoming Features - a) Better documentation :) b) More serial printer support c) Custom gadgets w/configuration file d) any suggested improvements...from users This is freeware or (unemploymentware) and I have included the source. You may modify and recompile for your own use but I ask that you do not modify and redistribute this archive without contacting me first. I am giving the source away so that other programmers may benefit from it and not to make money off it. I don't think you could....but just incase. Mail : Paul Miskovsky 9 Northolt Court Toronto, Ontario M9A 3B1 CANADA UUCP: paul.miskovsky@canrem.com If you have any ideas, complaints, bugs or questions feel free to drop me a line and I will try to get back to you as soon as possible. V. Compiling Source --------------------- The included source compiles under SAS/C V5.10b. It uses the includes from the developer kit release of 37.175/36.67. All functions are prototyped and the header file is concatenated to the main and subroutine files. There is also the LMK (make) file to aid in the compile. You will also require the 'lreqglue.o' object file to link with the rest of the code which I have also included. This is contained in the directory 'ReqLib' which is the full distribution for the req.library. The code may not be the tightest but it is very readable. Probably full of ENFORCER hits. I'm sorry about this but I never took advantage of Commodore's employee purchase plan to buy a system with an MMU. :) VI. Credits ------------- I would like to thank Robert S. Wagoner (Director of Product Development, Commodore Canada) for giving me that programming attitude and for being an inspiration to a starting programmer. Yup, that's my old boss. Amiga 1.3 RKM - Example source on parallel.device and printer.device