Bob: Thanks for responding. To clarify.... I have been using pcl-5 for years and using laser printers for output. I have also been using epson DM printers and the epson escape sequences. What I would like to do is produce all my reports on a "Windows Printer", i.e. GDI I have gotten as far as to find out that a driver called wlp was written that could replace the lp driver that is commonly used in SP-CREATE STATEMENT. However, when I use it and send data to a windows (inkjet) printer, the text is simply printed , left justified on the page. I am trying to find out what control sequences I need to be able to format the document . This would be my perfect solution. My second choice would be to send my report (prepared for a laser printer) to a file, so I can print it with DOSPRINT or something similar. So my question would be , how can a redirect printer out put to a file. Dave > Date: Fri, 23 Sep 2011 13:58:57 -0700 > From: [email protected] > To: [email protected] > Subject: Re: FW: wlp > > Seeing that you haven't had other responses, I'll jump in. > > It's not clear what your question is. I understood it to be: "What control > sequences can I send to a PCL-5 compatible printer that will cause minimal > style changes (bold, underline, maybe height and pitch), and allow me to > center some text?" Is that it? If not, please restate the question. If I > got it right, continue. > > There are some quite simple sequences in PCL-5 to do this. For example: > <Esc> & d 0 D Underline on > <Esc> & d @ Underline off > <Esc> ( s 3 B Bold on > <Esc> ( s 0 B Bold off > <Esc> ( s 1 7 H Pitch = 17 character per inch > (horizontal) > <Esc> ( s 1 0 H Pitch = 10 character per inch > > These are available in multiple places online. Wherever I say "<Esc>", > that is the escape character, which is decimal 27 or hex 1B. > > It is also good practice to start the job out with a reset code: > <Esc> E > and then to initialize everything you could otherwise only hope would be > set right in the printer's front panel, such as paper size, orientation, > typeface, and linespacing. > > Centering text is a bit harder. As long as you know the horizontal spacing > (pitch), and you're in a fixed-pitch font, you can do some math and insert > some initial spaces in order to push the following text over to the right > a certain amount. Or use a PCL sequence for horizontal positioning, > before printing. > > However, if you get into variable-pitch text, such as Arial or > Times-something, it gets difficult. The only way I know is to switch into > HPGL mode and set the positioning mode to centered. > > Oh, I just remembered another technique I saw somewhere (and thought was > clever): set the pitch so that characters are half as wide as normal (that > is, twice the pitch) and set the text to invisible, and rotate 180 > degrees. Position the cursor to the center of the sequence, then issue the > text. This will space to the left exactly half the width of the normal > text. Then set things back to normal and print. > > As I said above, all of this is dependent on printing to a known kind of > printer, a PCL-5 compatible one. For a more general solution, you > might look at our Print Wizard software. It allows you to specify changes > using an HTML-like language called Print Wizard Markup Language (PWML). > You can switch to bold with simply "<B>", and out of bold with "</B> (just > like in HTML). There are other markup tags for centering, underline, pitch > changes, height changes, etc., as well as some for paper size, > orientation, and duplexing. This gives you complete device independence. > > More on Print Wizard is at > www.anzio.com > > On Fri, 23 Sep 2011, David Grenfell wrote: > > > > > Sorry guys. I should have said "DEVICES FILE" not "PRINTERS FILE " in my > > request below. > > > > > > > > > > From: [email protected] > > To: [email protected] > > Subject: wlp > > Date: Thu, 22 Sep 2011 20:00:13 -0500 > > > > > > > > > > > > Hi guys: > > > > I'm back for another kick at using a windows printer from jbase; > > > > I have built my own printer system in that I specify from inside an > > application what type of printer I need. For example a "L"abel printer, > > "S"tatement printer etc. > > > > When the application runs, it then pulls a menu of printers that can handle > > this type of paper, and displays the menu of all printers available for it. > > The operator then choosed a printer, whether it be local or remote and the > > report is printed on the chosen printer. I got this idea from Windows. In > > an older version, I used to select the printers automatically from number > > of the port that the terminal was attached to, but this idea got squashed > > when networking came to bear. > > > > I can do this because I use the old 'printers' file as drivers for an epson > > or HP laser printer so that I replace my solid code such as ".bold text" > > with the appropriate code either for epson or HP laser. Of course the > > printing is done throught the que that is attached to the appropriate > > printer. > > > > Since my printing all comes out left justified when using the wlp printer > > driver. I am assuming that I must write a driver for the windows printer > > too. So , for example what would be a simple code fed to the printer that > > would: > > > > Print a specified font (ie courier bold, in 12 pt, and centred on the > > page. I only use regular , bold, underline, and point size. So give me > > one, and I can figure out the rest. > > > > Statement to create my que is: > > > > XXWINDOWS prog wlp -d "xx windows printer" > > > > the "XX" in the above could be a store desigation etc. > > > > Thanks again. This problem has been haunting me since I was a pup. > > > > Dave > > > > > > -- > > Please read the posting guidelines at: > > http://groups.google.com/group/jBASE/web/Posting%20Guidelines > > > > IMPORTANT: Type T24: at the start of the subject line for questions > > specific to Globus/T24 > > > > To post, send email to [email protected] > > To unsubscribe, send email to [email protected] > > For more options, visit this group at > > http://groups.google.com/group/jBASE?hl=en > > > > Regards, > ....Bob Rasmussen, President, Rasmussen Software, Inc. > > personal e-mail: [email protected] > company e-mail: [email protected] > voice: (US) 503-624-0360 (9:00-6:00 Pacific Time) > fax: (US) 503-624-0760 > web: http://www.anzio.com > street address: Rasmussen Software, Inc. > 10240 SW Nimbus, Suite L9 > Portland, OR 97223 USA > > -- > Please read the posting guidelines at: > http://groups.google.com/group/jBASE/web/Posting%20Guidelines > > IMPORTANT: Type T24: at the start of the subject line for questions specific > to Globus/T24 > > To post, send email to [email protected] > To unsubscribe, send email to [email protected] > For more options, visit this group at > http://groups.google.com/group/jBASE?hl=en
-- Please read the posting guidelines at: http://groups.google.com/group/jBASE/web/Posting%20Guidelines IMPORTANT: Type T24: at the start of the subject line for questions specific to Globus/T24 To post, send email to [email protected] To unsubscribe, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jBASE?hl=en
