home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / genie-commodore-file-library / MRFiles / GSPWRITE.SFX / pwrite.doc (.txt) < prev    next >
Encoding:
GEOS ConVerT  |  1990-02-12  |  16.9 KB  |  72 lines

  1. pwrite.doc
  2. PRG formatted GEOS file V1.0
  3. CONVERTED WITH GEOSHELL V2.2
  4. Write Image V2.1
  5. geoWrite    V2.1
  6.      @geoSHELL V2.2 DOCUMENTATION
  7. Copyright 1994 by Maurice Randall
  8.      @(requires geoSHELL V2.2 or greater)
  9.      @pwrite
  10.      @    (external transient)
  11. Once you've used this command a few times, you will love GeoWrite. This gives you the printing capabilites that GeoWrite left out. From the very beginning, GeoWrite was always intended to use your printer's graphic mode. This allows almost any style of font to be used. GeoWrite excels at this type of printing. Some of us still like using our printer's own built-in fonts, however. Yes, GeoWrite has a mode that let's you print in Draft or NLQ. That will use your printer's own font. But here's the catch, all style changes are ignored! This is where pwrite comes in. All bold, italic, underline, subscript and superscript style changes are supported. Only the outline style is ignored since graphic printing must be used in order to support it. So, do not use outline in your document or it will throw the layout off.
  12. This command also supports PAGE, DATE, and TIME in the headers and footers. The title page setting is also supported. Double-spacing is handled as well. But, 1 1/2 spacing is not, since GeoWrite does not format the page properly for this to work on all printers. And not all printers can print at 4 lines per inch. But to do 3 lines per inch only requires an extra linefeed.
  13. Now you can have your cake and eat it too. Use GeoWrite for all your graphic-type printing and use pwrite for all of your NLQ printing. When you create your GeoWrite document, you must use the COMMODORE 10 pt font throughout for proper formatting, since pwrite expects 80 characters per line and 66 lines per page. There will actually be 62 printed lines with 4 lines of nothing in order to skip over the perforation. This is how GeoWrite formats the document, so pwrite does it the same way. In fact, whatever GeoWrite does on the screen, pwrite will do on the printer, as long as the COMMODORE font is used.
  14. Pwrite does not check the font that is in use though. It will ignore any font change. But if you don't use the COMMODORE font, your results may not be what you expect. By using this font, GeoWrite will allocate 12 pixels for each line, giving you 6 lines per inch and so each page on the screen will look just like what comes out on the paper. GeoWrite always uses the number of pixels in the point size plus two extras for each line in the document.
  15.      @THE CONFIGURE FILE
  16. Here is another plus for pwrite. Before printing begins, it will look for a file called pwconfig. If it finds it, it will use the printer codes it finds in the file. Since pwrite does not use your normal GEOS printer driver, it must know how your printer works. This is what the pwconfig file is for. This contains the codes for turning on the style changes and turning them off. If pwconfig is not found, then all style changes will be ignored. You can also leave out any style change codes that you wish to have ignored when printing your document. Delete the ones that your printer does not support, or change them to any setting that you would like activated.
  17. There is also a series of codes that can be sent at the start of a document and another at the end. Any codes following 'open' will be sent at the beginning of your document. This is useful for setting up your printer into any special configuration you want, such as the desired font selection. Then, when printing is finished, the codes following 'close' will be sent. You can use this to reset your printer back to it's default settings, or whatever you desire. The default codes that are supplied will send the normal reset sequence of 27 64. This is what most Epson mode printers use. You are free to change this any way you want.
  18. All of the other settings should be self-explanatory. For instance 'boldon' will be used whenever the style change for bold is encountered. And likewise, 'boldoff' when non-bold text is once again encountered. The settings that are supplied are used on most Epson mode printers. Each of these settings will accept up to 20 codes. Each string of codes must be terminated with an UP-ARROW character. There must be one space separating each code. The basic rules for any command in geoSHELL is followed here. Just think of these as commands that only pwrite recognizes.
  19. If you are using a serial printer or serial interface, pwrite will use the parameters that are set by the pconf command. These are the device number, secondary address, whether or not you need linefeeds added and the character set being used. Be sure to use pconf to make these settings. This also applies to some of the other printing functions in geoSHELL. For geoCable users, the device number and secondary address are not important, since only serial devices use these.
  20.      @PRINTING YOUR DOCUMENTS
  21.      @PRINTING YOUR DOCUMENTS
  22. When you are ready to print, you must decide which pages you desire to print, and how your printer is connected. Here is one example:
  23. pwrite ap filename
  24. If you are familiar with geoSHELL, it's obvious what the filename does. But the parameter before the filename, 'ap', tells pwrite to print 'all' pages and send them to a printer or interface connected to the serial port.
  25. You can see that the 'p' is used just like with any other print command in geoSHELL. Likewise if you are using a geoCable, substitute a 'g' for the 'p'. Instead of using the 'a' to print all the pages, you can use an 'o' or an 'e'. These would select either 'odd' or 'even' pages. This makes it handy for printing double-sided sheets. The only thing you must remember is how your pages are numbered. The first page can start with an even number if you told GeoWrite to do so. Keep this in mind.
  26. For those times when you need to print just one or a few pages out of your document, you can tell pwrite to do so with a slightly different parameter arrangement. You still use the ap, ag, ep, or whatever, but you can also include a range of pages just before this. Here is an example:
  27. pwrite 12 24 ap filename
  28. This will print all pages from 12 through 24 of your document. If you used an 'o' instead of the 'a', then only the odd pages between those two would get printed. The pages that get printed are determined by how you have them numbered in the document. If your first page starts out as page number 36, then the previous example would print nothing. Let's say you wanted to print just page 10. The following example would do this:
  29. pwrite 10 10 ap filename
  30. You always select the starting page and the ending page when you use this parameter. Just remember that this is optional and you can leave it out if you wish to print the entire document.
  31. There might be an occasion when you need to print your pages in the other direction. If you were to put a higher number first and a lower number second in your parameter, then the higher numbered page would get printed first, followed by the next page before it and so on until the second page number specified is printed. Here's an example:
  32. pwrite 35 30 ap filename
  33. This will print the pages from 35 through 30 in reverse order.
  34.      @HINTS AND TIPS
  35. As with anything, the best way to learn anything is to just start doing it. But, here's some things you might want to remember when you are creating you
  36.      @HINTS AND TIPS
  37. As with anything, the best way to learn anything is to just start doing it. But, here's some things you might want to remember when you are creating your document.
  38. Unless you are experimenting with something a little different, be sure that the COMMODORE font is selected throughout your document. It is very easy for the BSW font to be mistaken here or there when viewing it on the screen. Watch your headers and footers. Make sure the correct font is chosen here also. It is more critical here. If the wrong font is used in the headers and/or footers, some of the data might not print out because of the space allowed. If your headers or footers are not coming out right, double check the font there. The BSW font does not require as much vertical space, and so all of the lines contained within might not print out.
  39. Speaking of headers and footers, these can be very useful. GeoWrite does not provide any means of controlling the top and bottom margins unless you use page breaks. But by using a header or footer with some carriage returns, GeoWrite will allocate a blank line for each carriage return. This let's you control the amount of blank space as each page skips over the perforation.
  40. Headers and footers work just a little different here. When using a header, the content of your page will begin at the very next line following your header. But when you use a footer, GeoWrite inserts one blank line before printing the footer. So, this will cause printing to go to the 63rd line instead of stopping at the 62nd line. So, if you want printing to begin two lines down, just hit two carriage returns in a blank header. Or if you want a bigger margin at the bottom of the page, add carriage returns to a footer. Just count one extra space for the blank one that is inserted by GeoWrite. Pwrite will follow the same format that GeoWrite does here.
  41. Don't worry if this sounds confusing, pwrite will format your page properly. Whatever you see on the screen will be what comes out on paper. But use that COMMODORE font or it might not. Even if you put just carriage returns in a header or footer, make sure that those carriage returns have the COMMODORE font assigned to them for proper line spacing.
  42. Actually, if you don't like the looks of the COMMODORE font on screen, you can substitute any other font as long as it's dimensions in height and width are exactly the same.
  43. When you set up or modify the pwconfig file, you 
  44. When you set up or modify the pwconfig file, you can put anything you want on any page except page one. Only page one is used by pwrite. This way, you can store different setups on other pages and just cut and paste them to page one when needed. You can also keep notes on the additional pages for your own use. If you use a printer with limited capabilites, such as a 1525, check out page 3 of the supplied pwconfig file. If you are using a CMD device and have assigned a partition with the path command, pwrite will also search the path partition for the pwconfig file. When it searches for your document, it will search all drives except the path partition. You don't have to have the document on the currently active drive. This allows large works that are spread across multiple files to be more easily printed without having to select the correct drive first. Just make sure that pwrite doesn't find the wrong one if you have more than one copy of the same name visible on your system.
  45. Since pwrite doesn't care what codes you use for each of the style changes, you might be able to do some special stuff. Let's say for example that you don't really need underlining in your document, but you want to use two different fonts. Just change the underlineon and underlineoff to select a different font. Then whenever you want to use this font, underline your text in GeoWrite. You can have up to 20 codes in each string. This should be more than enough to do some pretty fancy stuff. Use your imagination.
  46. In fact, if you are careful in planning, you could have your printer do double-wide and double-high printing. If you do double-wide, limit your line length with carriage returns. If you do double-high or anything else that would print larger than 6 lines per inch, use a page break to limit the length of the page. You might find that you will have to print one page at a time, in some cases when doing special things. Double-wide is handy for headlines.
  47. You can also print columns easily now by using both pcode (or gcode) and pwrite. Start by setting the left margin in your document all the way to the left and the right margin just slightly to the left of the middle on each page. Then begin by printing just the odd pages. When finished, use pcode to send the code to your printer that will move it's left margin over to the center of the page. Put your paper back into the printer and use pwrite to print the even pages. The second column will now print out.
  48. Or, if your printer supports returning to the top of form, you can set up an exec file to do it all in one step. The following example works on a STAR NX-1000 and any other printer that supports the CHR$(27)CHR$(12) sequence:
  49. pcode 27 64^ {tell the printer this is the top}
  50. pcode 27 67 70^ {make the page length longer}
  51. pcode 27 108 0^ {left margin to zero}
  52. pwrite 1 1 ap filename^ {first column}
  53. pcode 27 12^ {return to top}
  54. pcode 27 108 40^ {left margin to center}
  55. pwrite 2 2 ap filename^ {second column}
  56. {now do the next page}
  57. pcode 27 64^ {tell the printer this is the top}
  58. pcode 27 67 70^ {make the page length longer}
  59. pcode 27 108 0^ {left margin to zero}
  60. pwrite 3 3 ap filename^ {first column}
  61. pcode 27 12^ {return to top}
  62. pcode 27 108 40^ {left margin to center}
  63. pwrite 4 4 ap filename^ {second column}
  64. ...and so on....
  65. If you have included any photo scraps in your document, these will be ignored by pwrite. However, the correct amount of blank space will be inserted for the graphic. This allows you to put the paper back in the printer and do one of two things. Using a copy of your document, you can delete all of the text lines on the page and enter carriage returns in their place. And then use GeoWrite to print the graphic on your page. Or you can convert the GeoWrite document to a GeoPaint and then erase all the text and let GeoPaint or the 'ppaint' command print the graphic.
  66. With a little thought you will actually have more control here. You can place the graphic wherever you want on the page.
  67. If you have a printer that is wide enough to take a page sideways, you could print left and right pages and then fold them into a 5.5 x 8.5 inch booklet. Just use the codes in the 'open' string to control the size of your font and the lines per inch. A condensed elite setting works pretty good here. Also use margin settings in GeoWrite to help with this.
  68. There is one other hitch whenever you are printing with your printer's own fonts. That occurs when you use 'bold'. Remember that GeoWrite is designed to print in your printer's graphic mode. That was the original idea. NLQ printing was an afterthought. GeoWrite creates bold characters by doubling the width of each horizontal pixel in the characters. This will add one pixel to the overall width of the character. This will in turn produce less than 80 characters per line. Your printer, however, can print bold characters and still get 80 of them on each line. 
  69. So, now if you use bold characters in your document, what you see on the screen may not be exactly what comes out on paper. Let's say that you change an entire paragraph to bold. GeoWrite might use 6 lines to display it on the screen, but it might only take 5 lines to print it. This is the only problem you will run into. The entire content on the page will still be printed correctly with a blank line being added at the bottom. So, if this doesn't bother you, then OK. But if it does, you could substitute a font that is 7 pixels wide instead of 8 whenever you use bold type. Then what you see on the screen will be exactly what comes out on paper.
  70. If you use bold in a single line that does not cover the full width, then this will not be a problem. By trying it out you will learn to adjust for it. Even though the computer can do a lot of work for us, it still takes a little work on the part of the user. But that's the fun of it.
  71. As you use this command, you will discover many tricks that you didn't think were possible.
  72.