On Tue, 2008-10-14 at 19:15 -0300, Miles Thompson wrote: > On Tue, Oct 14, 2008 at 6:23 PM, Dušan Novaković <ndusan@xxxxxxxxx> wrote: > > > I have some request to sent text to matrix printer to print ticket for > > theater. Is it possible to do that whit some php functions? Main point > > is how to control length of paper that will be drawn inside and to > > print text on a specific place. It would be nice if somebody can write > > the code about this as example. > > > > Thnx, Dusan > > > > -- > > made by Dusan > > > > Decide on the font you will use - either 10 or 12 characters per inch. > A line is usually 1/8" high. > > So you essentially have a matrix running at "n" characters per inch > horizontally, and "m" fractions of an inch vertically. > > Fit your print into this matrix - some people do it with an array, others > just work the spaces. > > Provide a "test" ticket so the operator can get the printer lined up. With > a tractor feed, after that you are good for a whole box of tickets. > > Oh - one more thing - you may have to advance a number of lines so the > ticket can be torn off after printing, then reverse feed the same number. > > Another tip - set your page length just to the height of the ticket. > > You really want to exploit the basic native font built into the printer. > > Hope this helps - Miles I'm not sure I would have chosen PHP as the ideal language for this kind of thing, as it's strengths are mainly in the web server field. I suppose it could be done with the PHP CLI. Have you found a spec for the printer, i.e. what inputs it accepts, or is there a driver API that you know it uses? Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php