Vassilis K ha scritto: > I have an 9 pins printer for this job. > > If I understood well I have to make a file with the line that I want to print > then I shall use the SHELL command to send it directly to the printer lp1: > > SHELL lp -d lpt2 printfile.ps > > I need a small example to get it to work. > I also need the printer to feed one line per time. Is this possible? > If you printer has a 9 pin DB connector, then it could be a serial printer. If so, check out its manual, and determine the communication parameters; set up the serial port used to communicate to it (within gambas), then send every line you want to print to that serial port, followed by a CR and a LF: chr$(13) and chr$(10).
Using SHELL and /bin/lp is perhaps more simple but far less versatile and very slow (for what it can count speaking about printers...). /bin/lp (or /usr/bin/lp) is intended for a higher level usage, and it could be difficult to explain to it that you *don't* want to eject a page, you *don't* want to print if the printer is off-line, you *don't* want a banner and so on. By sending special characters and/or escape sequences you can take advantage of some printer features (may be your printer has a cutter, or other equipment). Probably it can do also graphics, barcode and more, but this is more difficult. Regards, Doriano ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user