home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_GEN / THEPRN14.ZIP / PRINTER.DOC < prev    next >
Text File  |  1994-01-15  |  91KB  |  2,107 lines

  1.  
  2.               ---------------------------------------------------               
  3.                 -----------------------------------------------                 
  4.                   -------------------------------------------                   
  5.                     ---------------------------------------                     
  6.                       -----------------------------------                       
  7.                         -------------------------------                         
  8.                           ---------------------------                           
  9.                             -----------------------                             
  10.                               -------------------
  11.                                 ---------------                                 
  12.  
  13.  
  14.               The Printer (tm)         by         Rob W. Smetana
  15.                                                   and Pro~Formance
  16.  
  17.                                 ---------------
  18.                               -------------------                               
  19.                             -----------------------                             
  20.                           ---------------------------
  21.                         -------------------------------                         
  22.                       -----------------------------------                       
  23.                     ---------------------------------------                     
  24.                   -------------------------------------------                   
  25.                 -----------------------------------------------                 
  26.               ---------------------------------------------------               
  27.  
  28.  
  29.  
  30.                               The Printer (tm)
  31.  
  32.                          **  Version 1.4 (1/94)  **
  33.  
  34.  
  35.  
  36.       Printer codes for hundreds of printers, that any programmer can use!
  37.  
  38.       Includes demo code for C, Pascal, Microsoft BASICs and PowerBASIC.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.     =====================================================================
  46.  
  47.         Copyright (C) 1989-1994, Rob W. Smetana    All Rights Reserved
  48.  
  49.  
  50.         132 Alpine Terrace   San Francisco, CA  94117   (415) 863-0530
  51.  
  52.  
  53.           The Printer, PDT, Pro~Formance and P~F are Trademarks of
  54.  
  55.                              Rob W. Smetana
  56.  
  57.     =====================================================================
  58.                                                                       
  59.  
  60.  
  61.     =====================================================================
  62.  
  63.                                 Packing List
  64.  
  65.     =====================================================================
  66.  
  67.  
  68.         PRINTER  DOC        This manual
  69.         CATALOG  DOC        A summary of our many programs
  70.         TO-ORDER DOC        An order form
  71.  
  72.         PRINTER  EXE        The Printer itself (database PLUS menu)
  73.  
  74.         EDIT     EXE        For users to edit or add printer codes
  75.                             AFTER they've selected a printer.
  76.  
  77.         PRINTER  CFG        The printer codes for the printer YOU
  78.                             selected.  Your programs need ONLY deal
  79.                             with this 1, small file!
  80.  
  81.                             * Created by Printer.Exe
  82.  
  83.                             * Read by Edit.Exe (and the demo programs)
  84.  
  85.         DEMO     EXE        Reads Printer.Cfg and uses it's information
  86.                             to format text on YOUR printer.
  87.  
  88.                             BE SURE to run Printer.Exe first and select
  89.                             a printer that's compatible with YOUR printer.
  90.  
  91.         PRINTER  DAT        A "structure file" used by our PDT program
  92.                             to help you view and edit printer code
  93.                             data files.
  94.  
  95.                             This file, together with The_Prn.? files
  96.                             (see below) also explain the record
  97.                             structure of printer code data files.
  98.  
  99.  
  100.                             The next "pairs" of files -- for PASCAL, C
  101.                             and BASIC -- provide the record structures
  102.                             (The_Prn.?) and demo code.
  103.  
  104.         THE_PRN  PAS        Structure/Type declarations
  105.         DEMO_PRN PAS        Demo
  106.  
  107.         THE_PRN  C          Structure/Type declarations
  108.         DEMO_PRN C          Demo
  109.  
  110.         THE_PRN  BAS        Structure/Type declarations
  111.         DEMO_PRN BAS        Demo
  112.  
  113.  
  114.                                                                       
  115.  
  116.  
  117.     =====================================================================
  118.  
  119.             THE PRINTER:   Eliminating a Programmer's Nightmare
  120.  
  121.     =====================================================================
  122.  
  123.     Our objective in developing The Printer was to help eliminate a
  124.     nightmare many programmers face:  printing formatted text on dif-
  125.     ferent printers, with each printer requiring different instructions
  126.     (ie., different printer codes).
  127.  
  128.      * If you want bold here, italics there, this phrase underlined,
  129.        etc., you need the printer codes to "turn on" these options.
  130.  
  131.      * And if you distribute your programs, you'll often need printer
  132.        codes for the dozens (or hundreds) of different printers your
  133.        users have -- unless you want to limit your audience!
  134.  
  135.        Few programmers have the time and resources to obtain appro-
  136.        priate codes for every printer.  Fortunately, you don't have
  137.        to:  The Printer offers you codes for hundreds of printers.
  138.  
  139.      * And with The Printer, you can, in many cases, develop simple print
  140.        routines you can use REGARDLESS OF WHICH PRINTER A USER SELECTS!
  141.  
  142.      * Finally, ANY programmer writing in ANY language can use The Printer.
  143.        If you can read a fixed-length record, you can use The Printer.
  144.  
  145.  
  146.     The Printer contains printer codes for over 720 different printers
  147.     (over 160 in user-supported versions).  For each printer, we al-
  148.     located space for about 70 printer codes.  Some of these are blank,
  149.     "user" codes -- so you (or your users) can customize codes for
  150.     specific needs, or we have room to expand into.
  151.  
  152.  
  153.     Examples:  Here's how The Printer can help.
  154.     -------------------------------------------
  155.  
  156.     In this package you'll find PRINTER.EXE -- a multi-purpose program
  157.     and printer database in one.  You (or your users) can use Printer.Exe
  158.     to install a printer.  And YOU can use it to expand the printer code
  159.     database to its fixed-length format -- which you can then view and
  160.     edit (more on this later).  When used with your programs : : :
  161.  
  162.      * Just run Printer.Exe and select a printer from the menu.  You
  163.        can then review and edit the printer codes for that printer.
  164.  
  165.      * When you're satisfied with the codes you see, press F2 and
  166.        we'll save to disk a small configuration file:  PRINTER.CFG.
  167.  
  168.  
  169.     Your programs need only deal with PRINTER.CFG!  It'll contain most
  170.     every printer code you'll need.  To enable or turn on a printer
  171.     feature, just print the appropriate "field."  For example:
  172.  
  173.                                                  continued . . .       
  174.  
  175.  
  176.     Examples (continued)
  177.  
  178.  
  179.     Note:
  180.  
  181.      * Our examples use BASIC code for its simplicity.  If you program
  182.        in other languages, mentally translate these simple examples.
  183.  
  184.      * Our examples assume we already read Printer.Cfg using a structure
  185.        or TYPE called "Printer."  The file The_Prn.? has the complete
  186.        record format of Printer.Cfg.
  187.  
  188.      * Our examples use "rtrim$," a BASIC function that trims trailing
  189.        spaces from strings.  Each printer code is allocated 14 bytes
  190.        even though some codes are 1-3 bytes.  Trimming the trailing
  191.        spaces ensures we don't shift text right by printing excess spaces.
  192.  
  193.  
  194.          To reset the printer:  lprint rtrim$ (ThePrn.Initialize);
  195.  
  196.        To print Text$ in bold:  lprint rtrim$ (ThePrn.BoldON); Text$;
  197.            and back to normal:  lprint rtrim$ (ThePrn.BoldOFF)
  198.  
  199.            To Underline Text$:  lprint rtrim$ (ThePrn.UnderlineON); Text$;
  200.            and back to normal:  lprint rtrim$ (ThePrn.UnderlineOFF)
  201.  
  202.  
  203.  
  204.     That's it.  It's that simple!  While there are many variations on
  205.     this logic (like loading codes into an array, then printing already-
  206.     trimmed array elements), the simplicity remains.
  207.  
  208.  
  209.     And if your user installs a different printer, your code need NOT
  210.     change.  Just read Printer.Cfg, with the codes for the new printer,
  211.     and proceed as usual!
  212.  
  213.  
  214.                                                                        
  215.  
  216.  
  217.     =====================================================================
  218.  
  219.                                Packing List
  220.  
  221.     =====================================================================
  222.  
  223.     If you have any questions about anything here, give us a call at
  224.     (415) 863-0530.  A few minutes on the phone could save lots of time.
  225.  
  226.     File           Description
  227.     -----------    ------------------------------------------------------
  228.  
  229.     Printer.Exe.   A multi-purpose program AND database that:
  230.  
  231.                    * You may distribute along with your programs (if you
  232.                      wish) -- provided you have the registered version.
  233.  
  234.                    * Compresses the printer database by about 85 percent.
  235.  
  236.                    * Allows users to:
  237.  
  238.                      - Select a printer from a menu.
  239.                      - Review and edit printer codes.
  240.                      - Save a small configuration file (Printer.Cfg)
  241.                        to disk with codes appropriate for their printer.
  242.  
  243.                        YOU need only deal with this small "configuration
  244.                        file" to get all the information you'll need to
  245.                        drive your user's printer (for the most part).
  246.  
  247.                    * Lets YOU expand the database to its full, fixed-
  248.                      record size and format.  You may then view and edit
  249.                      it (using our PDT which we'll describe later?).
  250.  
  251.     Edit.Exe       A program you may, if you wish, distribute with your
  252.                    programs.  When you use Printer.Exe to select a printer,
  253.                    it saves to disk a small printer "configuration file."
  254.                    Should your users ever want to edit these printer codes,
  255.                    Edit.Exe is a small, fast way to do it.
  256.  
  257.     Printer.Dat    This is a "PDT structure file" that, together with
  258.                    The_Prn.?, explains the field structure of the fixed-
  259.                    length files The Printer can create.
  260.  
  261.                    "PDT" (the Pro~Formance Data Tool), is a terrific
  262.                    program that's ideally suited to viewing and editing
  263.                    data files.  We could not have developed The Printer
  264.                    without PDT.  Section III describes PDT more fully.
  265.  
  266.     The_Prn.?      "Include files" (or units) containing TYPEs (structures)
  267.                    for both fixed-length files The Printer creates.
  268.  
  269.     Demo_Prn.?     Demo programs ("?" = .BAS, .PAS or .C) showing how
  270.                    to read Printer.Cfg and display printer codes.  Some-
  271.                    thing like this could prove useful in your programs.
  272.  
  273.                                                                        
  274.  
  275.  
  276.     ====================================================================
  277.  
  278.                              A WORK IN PROGRESS
  279.  
  280.     ====================================================================
  281.  
  282.     We consider The Printer a "work in progress," awaiting your feedback.
  283.     If you find The Printer useful, or if you think it **could** be
  284.     useful but isn't now, PLEASE take a moment and jot down some ideas
  285.     to help shape the future of this effort.  We, and other programmers
  286.     we spoke with, are convinced this effort is worthwhile.  But we're
  287.     not yet sure which format to distribute printer codes in, and which
  288.     tools to offer.  Please help us shape the destiny of The Printer.
  289.  
  290.     Here are some issues we'd like your feedback on.
  291.  
  292.      * Printer.Exe can expand its compressed database into a fixed-
  293.        length file -- so you can view and edit it, add or delete
  294.        printers, add printer codes, etc.  But currently, there's
  295.        no way to re-compress the fixed-length file and re-create
  296.        Printer.Exe.  How valuable would that option be?
  297.  
  298.      * Printer.Exe lets users edit and add printer codes.  Should it?
  299.  
  300.      * Printer.Cfg is saved as a fixed-length file.  In this form
  301.        one can easily use a TYPE or structure to read all codes in
  302.        one gulp.  But other formats could work as well:  delimited,
  303.        sequential, etc.  All have advantages; which is preferable?
  304.  
  305.      * Some printer codes must be sent in a specific sequence.
  306.        But a database, by itself, offers no clues as to the proper
  307.        sequence.  Would "Notes From The Trenches" help?  Can you
  308.        offer tips for printers you're familiar with?
  309.  
  310.      * The Printer contains no graphics-oriented printer codes since,
  311.        by themselves, graphics codes without other information can
  312.        be close to useless.  Would a related product would help?
  313.  
  314.      * What about newly-added printers?  Manufacturers release new
  315.        printers every year.  How can we best keep you up to date?
  316.  
  317.      * When printer codes are saved to Printer.Cfg, they're space-
  318.        padded to 14 bytes each.  Is this format easily usable in
  319.        all programming languages?
  320.  
  321.      * Some codes contain Null (Chr$(0)).  Is this a problem?
  322.  
  323.      * What tools would be useful in a "professional" package?  To
  324.        make The Printer accessible to all programmers regardless of
  325.        their means, we've considered offering two registered versions:
  326.        - A "plus" version with the basics.
  327.        - A "professsional" version with optional features (like
  328.          the ability to edit codes and re-create Printer.Exe).
  329.  
  330.        Reactions?  Features?  Options?
  331.                                                                        
  332.  
  333.  
  334.     =================================================================
  335.  
  336.                                CONTENTS
  337.  
  338.     =================================================================
  339.  
  340.     The rest of this manual is organized into 10 short sections:
  341.  
  342.      Section   I:  Copyrights, License, Disclaimer, Registering,
  343.                    Distributing The Printer
  344.  
  345.      Section  II:  Installing The Printer;  Quick Start
  346.  
  347.      Section III:  Introducing PDT -- a "Must Have" for Programmers
  348.  
  349.      Section  IV:  What You MUST KNOW to Use Printer Codes
  350.  
  351.      Section   V:  Using Printer.Exe -- Use #1, Selecting a Printer
  352.  
  353.      Section  VI:  Using Printer.Exe -- Use #2, Expanding the Database
  354.  
  355.      Section VII:  Using Printer Codes with "Placeholders"
  356.  
  357.      Appendix  I:  The Record Structure of The Printer's Data Files
  358.  
  359.      Appendix II:  Using PDT to View and Edit ANY File
  360.  
  361.      Appendix III: Registering and Ordering
  362.  
  363.     =================================================================
  364.  
  365.  
  366.  
  367.                                                                      
  368.  
  369.  
  370.     =================================================================
  371.  
  372.                  Section I:   Copyrights and Trademarks
  373.  
  374.     =================================================================
  375.  
  376.     For information, contact:              Rob W. Smetana
  377.                                            Pro~Formance
  378.                                            132 Alpine Terrace
  379.                                            San Francisco, CA  94117
  380.                                            (415) 863-0530
  381.  
  382.  
  383.           The Printer is Copyright 1989-1994, Rob W. Smetana
  384.                     All Rights Reserved Worldwide
  385.  
  386.  
  387.       The Printer, The Pro~Formance Data Tool and PDT are Trademarks
  388.                            of Rob W. Smetana
  389.  
  390.             LaserJet is a Trademark or Hewlett-Packard Corp.
  391.  
  392.       Other trademarks belong to their respective trademark holder.
  393.  
  394.  
  395.     =================================================================
  396.  
  397.                      Disclaimer and Limited Warranty
  398.  
  399.     =================================================================
  400.  
  401.     We've made every effort to ensure the reliability and accuracy
  402.     of this product.  If you find errors in this material, or if you
  403.     have comments, suggestions or requests, please contact us immedi-
  404.     ately.  But neither Rob W. Smetana nor Pro~Formance can assume
  405.     any liability for damage that occurs because of usage of or
  406.     reliance on this product.
  407.  
  408.     We warrant that any disks we send you will be free from defects
  409.     in materials or workmanship for a period of 30 days from the date
  410.     shipped.
  411.  
  412.     THIS SOFTWARE AND ALL ACCOMPANYING MATERIAL(S) ARE OFFERED AS-IS.
  413.     EXCEPT FOR THE WARRANTY DESCRIBED IN THE ABOVE PARAGRAPH, THERE
  414.     ARE NO WARRANTIES EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
  415.     TO, IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PAR-
  416.     TICULAR PURPOSE, AND ALL SUCH WARRANTIES ARE EXPRESSLY AND SPECIFI-
  417.     CALLY DISCLAIMED.
  418.  
  419.     IN NO EVENT SHALL Rob W. Smetana and/or Pro~Formance BE RESPONSIBLE
  420.     FOR ANY INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOST PROFITS,
  421.     EVEN IF Rob W. Smetana and/or Pro~Formance HAVE BEEN ADVISED OF THE
  422.     POSSIBILITY OF SUCH DAMAGE.
  423.  
  424.     Information contained herein and in the printer database is subject
  425.     to change without notice and does not represent a commitment on the
  426.     part of Rob W. Smetana and/or Pro~Formance.
  427.                                                                        
  428.  
  429.  
  430.     =================================================================
  431.  
  432.                    License and Non-Disclosure Agreement
  433.  
  434.     =================================================================
  435.         
  436.     Running Printer.Exe, using anything in this package, or registering
  437.     for The Printer indicates your understanding and acceptance of the
  438.     license and warranty herein.
  439.  
  440.     The software and printer code database described in this document
  441.     are furnished under a license agreement.  The software and database
  442.     may be used only in accordance with the terms of that agreement.
  443.  
  444.      * No work derived from this material may be distributed in any
  445.        form if it substantially or in part duplicates the functionality
  446.        and/or objectives of The Printer and the printer database.
  447.  
  448.      * REGISTERED USERS:  This product is licensed to you alone.  You
  449.        may make copies solely for the purpose of reasonable back-up of
  450.        this package.  You agree not to copy or transmit this material
  451.        for any other purpose, except as provided for below, and further
  452.        agree not to make it available to others through a network
  453.        configuration.
  454.  
  455.      * REGISTERED USERS may use materials included here, and distribute
  456.        Printer.Exe and Edit.Exe to clients and users of programs or code
  457.        you've written, PROVIDED THAT:
  458.  
  459.        - You do NOT distribute, or allow to be distributed, the expanded,
  460.          un-encrypted printer code database, or any significant portion
  461.          thereof.  By "significant" we mean 10 records or more.
  462.  
  463.        - You do NOT reveal to anyone the "password" required to expand
  464.          the compressed, encrypted database.
  465.  
  466.      * REGISTERED USERS:  Should you distribute, to users of programs you
  467.        have written, your own version of the printer database, you agree to:
  468.  
  469.        - Encrypt the database such that no other person or program,
  470.          save yours, can access it.
  471.  
  472.        - Not disclose to anyone the method(s) used to encrypt or
  473.          de-encrypt the database.
  474.  
  475.        - Allow users of your programs access only to that reasonable
  476.          portion of the database that serves their immediate needs.
  477.  
  478.          While it would be considered reasonable for a specific user
  479.          or network to need access to printer records for 1-3 dif-
  480.          ferent printers simultaneously, it would be unreasonable
  481.          to allow simultaneous access to 10 printer records or more.
  482.  
  483.      * SHAREWARE VERSIONS may be used for 90 days so you may thoroughly
  484.        evaluate how The Printer may serve your needs and those of your
  485.        users.  But you may not distribute any part of The Printer in any
  486.        way except as provided for in "Distributing The Printer."
  487.                                                                        
  488.  
  489.  
  490.     =================================================================
  491.  
  492.                         Distributing The Printer
  493.  
  494.     =================================================================
  495.  
  496.  
  497.     Shareware distributors, bulletin boards and user clubs may
  498.     distribute "user-supported" (or shareware) versions of this
  499.     software provided that:
  500.  
  501.      *  Your company name, literature, etc. do not promote or
  502.         include the words "freeware" or "free" software -- which
  503.         terms misrepresent "user-supported" software.  Expressly
  504.         prohibited from distributing any software by Pro~Formance,
  505.         Rob W. Smetana and/or Brandon S. Smetana are:  American
  506.         Freeware, California Freeware and U.S. Freeware.
  507.  
  508.      *  You include, unmodified, all files included with this
  509.         software including:
  510.  
  511.         Printer.Exe, Printer.Doc, Edit.Exe, Printer.Dat, The_Prn.?,
  512.         Demo_Prn.? and any other files mentioned in Readme.Bat or
  513.         Packing.Lst.
  514.  
  515.      *  You charge a "distribution fee" of no more than $8 (US).
  516.  
  517.      *  You clearly state that continued use of "user-supported"
  518.         software REQUIRES paying for the software.
  519.  
  520.  
  521.                                                                        
  522.  
  523.  
  524.     =================================================================
  525.  
  526.             The Benefits of Registering;  How we "Say Thanks"
  527.  
  528.     =================================================================
  529.  
  530.     The Printer is NOT free software.  It is neither "public domain"
  531.     software nor "freeware."  It is "user-supported" shareware.
  532.  
  533.     This software is Copyright 1989-1994, Rob W. Smetana.  It is
  534.     protected by both United States copyright law and international
  535.     treaty provisions.
  536.  
  537.     Shareware versions of The Printer work just like fully registered
  538.     versions except that:
  539.  
  540.      * Shareware versions of Printer.Exe and Edit.Exe remind you that
  541.        they're unregistered and may not be freely distributed.
  542.  
  543.      * Shareware versions contain printer codes for over 160 of the
  544.        most popular printers.  To "say thanks" to those who register,
  545.        we send them a database with over 700 printers.
  546.  
  547.      * All versions include an option to expand the database to a
  548.        fixed-length version (so you may view and edit it).  Shareware
  549.        versions will write out about 50 records so you'll be able to
  550.        clearly see how the full database may be viewed and edited.
  551.  
  552.  
  553.     To Register Instantly:
  554.     ----------------------
  555.  
  556.     Call (415) 863-0530 with your VISA or MasterCard number.
  557.  
  558.      * This can cut 2-3 weeks off delivery time, since we needn't
  559.        wait for your order to arrive by mail, and we don't have
  560.        to wait 10 business days for checks to clear the bank.
  561.  
  562.  
  563.     To Register by Mail:
  564.     --------------------
  565.  
  566.     Just fill out the order form at the back of this manual.
  567.  
  568.      * PLEASE NOTE that, because we offer so many programs, our
  569.        order form has 2 pages.
  570.  
  571.        - Page 1 lists each program and the cost of each.
  572.  
  573.        - You fill in page 2, indicating which program(s) you'd like
  574.          to order, and adding your name, address, credit card
  575.          information (if appropriate) and so forth.
  576.  
  577.      * Mail your order form to:
  578.  
  579.        Pro~Formance   132 Alpine Terrace   San Francisco, CA  94117  USA
  580.  
  581.                                                                        
  582.  
  583.  
  584.     =================================================================
  585.  
  586.            Section II:  Installing The Printer;  Quick Start
  587.  
  588.     =================================================================
  589.  
  590.     Installing The Printer
  591.     ----------------------
  592.  
  593.     Copy these files to any path:  (only Printer.Exe is required)
  594.  
  595.               Printer.Exe, Edit.Exe, The_Prn.?, Demo_Prn.?
  596.  
  597.     If you plan to expand the database to it's fixed-length format, we
  598.     strongly urge you to get a copy of PDT to help view and edit it.  If
  599.     you do install PDT, be sure to copy Printer.Dat to PDT's special sub-
  600.     directory:  PDT.DIR.  If you do, whenever you run PDT and open the
  601.     fixed-length database, PDT will be able to automatically format your
  602.     view of the database in logical rows and columns.  See Appendix II.
  603.  
  604.  
  605.     Quick Start
  606.     -----------
  607.  
  608.     We know you're anxious to begin, so try both of these.  Then, BE
  609.     SURE to read this manual later -- with information you MUST KNOW!
  610.  
  611.      * Select a printer:
  612.  
  613.        - Run Printer.Exe.  The bottom of your screen will always have
  614.          instructions on what you should do next.
  615.        - Highlight a printer and press <enter> to "select it."
  616.        - Review the printer codes for that printer; edit any you care to.
  617.        - Press F2 to save your printer codes to Printer.Cfg.
  618.        - Press F10 twice to exit to DOS.
  619.  
  620.        Now review Printer.Cfg -- using PDT or Demo_Prn.? that we included.
  621.        Or use The_Prn.? or Printer.Dat as the basis of a program you
  622.        write to review or try out the printer codes.
  623.  
  624.  
  625.      * Expand the database to it's fixed-length format:
  626.  
  627.        - Ensure there's enough disk space for Printer.Dat:  about 800k
  628.          with registered versions; about 50k with shareware versions.
  629.        - Run Printer.Exe like this:
  630.  
  631.                       printer  rws-54321 <enter>
  632.  
  633.          With registered versions, replace "serial #" with the serial
  634.          number we sent you with your registered version.  And share-
  635.          ware versions will write out about 50 records to give you a
  636.          feel for all features of The Printer.
  637.  
  638.        Now review Printer.Dat.  Here's where PDT comes in v-e-r-y
  639.        handy -- especially if you installed the PDT "structure file"
  640.        (also called Printer.Dat) in PDT's special subdirectory.
  641.                                                                        
  642.  
  643.  
  644.     =================================================================
  645.  
  646.        Section III:  Introducing PDT  (the Pro~Formance Data Tool)
  647.  
  648.     =================================================================
  649.  
  650.     We've mentioned PDT before.  And we'll mention it again, simply
  651.     because it's the finest tool we've ever seen to view and edit ANY
  652.     file -- especially fixed-length files like Printer.Dat, Printer.Cfg,
  653.     dBase files, and random record files produced by any language.  We
  654.     could not have developed The Printer without PDT.
  655.  
  656.     Here's a brief overview of PDT.  Appendix II explains how to use PDT
  657.     to view/edit The Printer's files as well as other files you may have.
  658.  
  659.      * With PDT you can view and edit ANY type of file:  dBase files,
  660.        other types of data files, executable files (eg., .Exe or .Com
  661.        files), EBCDIC files, ASCII files, font files -- any file.
  662.  
  663.      * You can view and edit ANY SIZE file -- up to two gigabytes!  Jump
  664.        from the top to the bottom of any size file instantly.  And you
  665.        can open up to 4 files at once.  View and compare different files.
  666.        Or work in different areas of the same file.  Since each file can
  667.        be up to two gigabytes in size, you can work with up to 8 giga-
  668.        bytes of data at once!
  669.  
  670.      * You can manage database files like you've never been able to
  671.        before.  PDT offers unique features to help you manage dBase
  672.        or ANY fixed-length record file (data or font files, etc.).
  673.  
  674.        - PDT detects dBase ".DBF" files, formatting your "view" of
  675.          them so fields are automatically formatted out for you.
  676.  
  677.        - With other fixed-length data files (like those created by
  678.          programs written in C, Pascal, BASIC, COBOL, etc.), PDT
  679.          lets you easily and quickly define their "structure."
  680.  
  681.        - Once PDT knows the structure of a file, you'll be able to:
  682.  
  683.          -- Easily view and edit the file, tabbing quickly from
  684.             field to field.  You can even press a key to edit
  685.             numeric fields stored in "packed binary" form.
  686.  
  687.          -- Mark blocks (either columns or records) and then:
  688.             Export them, Copy them, Erase or Fill them, etc.
  689.  
  690.          -- Expand or Shrink the width of fields.  And, if you
  691.             like, PDT will automatically update the dBase header
  692.             and its own "structure" files to reflect the change.
  693.  
  694.      * PDT even manages EBCDIC files -- like those found on, or
  695.        downloaded from, large IBM computers.
  696.  
  697.      * PDT can also help you:
  698.        - Repair files -- regardless of their type or size.
  699.        - Determine a file's structure (record or field length, etc.).
  700.        - Edit executable files (customize messages, options or serial #s).
  701.                                                                        
  702.  
  703.  
  704.     =================================================================
  705.  
  706.         Section IV:   What You MUST KNOW to Use The Printer Codes
  707.  
  708.     =================================================================
  709.  
  710.     Slots for 70 Printer Codes
  711.     --------------------------
  712.  
  713.     For each printer we've reserved 70 "slots" for printer codes.  About
  714.     17 of these are "expansion" or "user" slots.  You can use these to
  715.     add codes specific to programs you write.  Or your users can custo-
  716.     mize codes to suit their specific needs.  And if we later add codes,
  717.     we'll have room to expand into without disturbing what exists.
  718.  
  719.  
  720.     Codes are Stored as Strings
  721.     ---------------------------
  722.  
  723.     Printer codes are stored in string (or binary) format.  You don't
  724.     need to parse or decipher codes like 027, 064, 018.   And instead
  725.     of 11 bytes these codes would consume, we need only 3.  But, if
  726.     you expand the printer database to its fixed-length format (or if
  727.     you look at Printer.Cfg) you'll find each printer code has been
  728.     allocated 14 bytes -- the code plus trailing spaces (ASCII 32).
  729.     This fixed-length structure simplifies editing, especially with PDT.
  730.  
  731.     In most cases, to use a printer's features, just send a code to the
  732.     printer as-is -- after trimming off the trailing spaces.  Be sure to
  733.     trim ASCII character 32 only (see below).  For example, to turn
  734.     Italics on, a BASIC programmer might just read Printer.Cfg (using a
  735.     TYPE or structure) and then:
  736.  
  737.       LPRINT RTrim$ ( ThePrn.ItalicsON ).
  738.  
  739.  
  740.     Beware Character 0
  741.     ------------------
  742.  
  743.     Some codes contain or end with ASCII character 0.  It's CRITICAL
  744.     that you don't interpret this Nul character as white space and
  745.     trim it -- the code is meaningless without it.  BASIC programmers:
  746.  
  747.      * DO use BASIC's RTRIM$ to trim blanks (Chr$(32)) from codes.
  748.  
  749.      * Do NOT use functions like Crescent Software's qpRTRIM or
  750.        pdqRTRIM.  Crescent's functions trim BOTH character 32 AND
  751.        character 0 -- which could render some codes worthless!
  752.  
  753.  
  754.     Note:  Epson printers often accept printer codes in two different
  755.     formats such as:  "Escape + Chr$(#)" or "Escape + #" ("#" = a number).
  756.     We've heard rumors some Epson compatibles dislike the 2nd format; so
  757.     we standardized on the 1st.  This renders such codes a little harder
  758.     to maintain and edit (although PDT lets you enter any ASCII character).
  759.                                                                        
  760.  
  761.  
  762.     Placehoders (ASCII character 251:  √)
  763.     -------------------------------------
  764.  
  765.     While you can use most printer codes as-is, a few codes require that
  766.     you "fill in the blanks."  Actually, you'll replace "placeholders"
  767.     with appropriate code(s).
  768.  
  769.     For example, for most printers the database contains codes to switch
  770.     to 6- or 8-lines-per-inch (8-LPI).  But suppose your program needs
  771.     finer precision -- you need to move down the page 3/60 of an inch.
  772.     ("<" stands for ESCAPE -- ASCII character 27.)
  773.  
  774.      * An Epson "Alternate Line Spacing" code might look like:  <A√
  775.  
  776.      * The comparable code for LaserJets might look like this:  <&a√V
  777.  
  778.     In both cases you'd scan for our placeholder (ASCII 251 or √), and
  779.     replace it with "3" for Epson LQ printers, or "36" for LaserJets.
  780.     (Lasers use 1/720 as the unit of motion for this code, Epsons 1/60).
  781.  
  782.     This obviously requires that you know the units of measurement or
  783.     the formulas needed to calculate variables.  We'll provide some of
  784.     these later.
  785.  
  786.     You can decide to use these codes or ignore them.  Here are some
  787.     codes that may require that you replace placeholders with variables:
  788.  
  789.  
  790.                          Select Character Sets
  791.                            Select Master Font
  792.  
  793.                          Variable Line Spacing
  794.                     Alternate Variable Line Spacing
  795.  
  796.                           Page Length: Inches
  797.                           Page Length: Lines
  798.  
  799.                              Set Tab Stops
  800.  
  801.                              Set Top Margin
  802.                            Set Bottom Margin
  803.                             Set Left Margin
  804.                             Set Right Margin
  805.  
  806.                   Absolute Move to a Vertical Location
  807.                   Relative Move to a Vertical Location
  808.  
  809.                  Absolute Move to a Horizontal Location
  810.                  Relative Move to a Horizontal Location
  811.  
  812.                                                                        
  813.  
  814.  
  815.     Some Codes are Blank Opportunities for your Users
  816.     -------------------------------------------------
  817.  
  818.     There are many "families" of printers:  dot matrix, laser, "daisy-
  819.     wheel," Postscript (which we did not include), etc.  Certain types
  820.     of printer codes are relevant for some families but not others.
  821.  
  822.     For example, dot matrix printers offer "draft" and "near letter
  823.     quality" options.  Other families have no comparable option.  Sim-
  824.     ilarly, laser printers let you save (push) the cursor position,
  825.     jump somewhere else on the page to do something, then restore (pop)
  826.     the cursor and continue where you left off.  Character- or line-
  827.     oriented printers (eg., dot matrix) offer nothing comparable.
  828.  
  829.     The point is that for EVERY printer, some "slots" will be blank --
  830.     a consequence of combining different families into one database.
  831.     But as long as your users use Printer.Exe to "install" a printer,
  832.     THEY can fill in these blanks (or not) as they see fit.  Then, if
  833.     they turn on options, it's their responsibility to ensure a printer
  834.     code exists for them.  If it's blank, nothing will happen.
  835.  
  836.     One reason we mention this is that if you run Printer.Exe and select
  837.     a printer to review, you should EXPECT that at least 20 of 70 codes
  838.     will be blank.  Of these 20+, 17 or so are "user" codes.
  839.  
  840.  
  841.     LaserJet Font Codes
  842.     -------------------
  843.  
  844.     Because we combined different families of printers into one
  845.     database, we had to make some compromises.
  846.  
  847.     We settled on 14 bytes for each printer code after carefully
  848.     reviewing the widths of thousands of codes.  But we knew this
  849.     would truncate some Hewlett-Packard codes -- particularly those
  850.     specifying LaserJet and DeskJet fonts.  Not to worry . . .
  851.  
  852.     We've learned from experience that to switch fonts on LaserJets,
  853.     one should be v-e-r-y specific.  That's because lasers may have 2 or
  854.     more fonts which share **some** attributes.  If you want, say,
  855.     condensed print (17 pitch), be sure to specify which one:  fixed/
  856.     proportional, medium/bold, upright/italic, Line Printer/Times Roman,
  857.     etc.  If you don't, you're in for some surprises.
  858.  
  859.     To select fonts, one should specify Orientation, Fixed/Proportional,
  860.     Symbol Set, Pitch, Height, Style, Stroke Weight and Type Face.  This
  861.     can be done with a code like this ("<" = Escape)
  862.  
  863.                         <(10U<(s0p10h12v0s0B<(s3T
  864.  
  865.     That's 25 characters -- which we don't have room for.  But you CAN
  866.     accurately specify fonts.  Just send 2 or more of the codes we
  867.     provide (some may have "placeholders").  In this case you'd send:
  868.  
  869.      * Select Character Set    (<10U)    * Select 10 pitch
  870.      * Bold ON                           * Select Type Face    (<(s3T)
  871.  
  872.                                                                        
  873.  
  874.  
  875.     Origin(s) of this Printer Database
  876.     ==================================
  877.  
  878.     When we originally considered developing this database, we asked
  879.     other programmers to contribute by sending us disks or E-Mail with
  880.     their offerings.
  881.  
  882.     A handful of people contributed, most of whom sent paper (copies of
  883.     manuals, books, etc.).  They realized, like we did, that typing
  884.     printer codes is time-consuming, boring, tedious and potentially
  885.     error-filled.
  886.  
  887.     We didn't want to manually enter this stuff either.  And we weren't
  888.     satisfied with the number of printers we had.  So we looked around
  889.     for existing databases.  We found several, merged them together,
  890.     then used what contributors sent to:
  891.  
  892.      * Verify what we had.
  893.  
  894.      * Fill in the gaps (missing printers or missing codes).
  895.  
  896.      * Reconcile inconsistencies between 2 or more sets of codes for
  897.        the same printer.
  898.  
  899.  
  900.  
  901.     Special Thanks to Rick Pedley and Matt Pritchard
  902.     ------------------------------------------------
  903.  
  904.     Rick sent us codes for hundreds of printers.  Matt sent, direct from
  905.     Epson and Toshiba, summaries of printer codes for dozens of the most
  906.     popular printers.
  907.  
  908.     These were invaluable!  Without them, we could not have reconciled
  909.     the many inconsistencies we found among codes for the same printer
  910.     (from different databases).
  911.  
  912.  
  913.     A Work in Progress; Bugs and Their Ilk
  914.     ======================================
  915.  
  916.     Like many good programs, this database may never be finished.
  917.     There will always be printers to add.  And there are many holes --
  918.     printers for which we have few codes (some have just 2-3 codes).
  919.  
  920.     And what can I say.  There are bound to be bugs in this database
  921.     (although in 2 years, nobody has mentioned any).
  922.  
  923.     If you find errors, if you can fill in missing codes, or if you add
  924.     printers, please send them to us -- ON DISK.  You can use PDT to
  925.     create new/modified records in the proper format.  Then just use
  926.     PDT's Block Mark and Block Export features to export new records to
  927.     disk and send them to us (or call us to upload your contributions).
  928.  
  929.                                                                        
  930.  
  931.  
  932.     Industry Standardization Will Help the Next Generation(s)
  933.     =========================================================
  934.  
  935.     One of the things that makes this database so valuable (and so
  936.     tedious to manage) is that printer manufacturers have used so
  937.     many different (read, proprietary) ways to accomplish the same
  938.     thing.  Even the same manufacturer may change codes with new
  939.     models.  For example, Epson's line spacing codes may mean
  940.     DIFFERENT THINGS (or may be irrelevant) depending on whether
  941.     you're dealing with early or later model Epson printers.
  942.  
  943.     This is an impossible nightmare for most programmers.  They simply
  944.     don't have the time or resources to obtain appropriate codes for
  945.     each printer.  Fortunately:
  946.  
  947.      * This printer database is available, giving programmers tools
  948.        to manage hundreds of printers in basic ways with just a few
  949.        lines of code, and without having to worry about which printer
  950.        is installed (or which printer their user switches to).
  951.  
  952.      * And printer manufacturers seem to be standardizing on a small
  953.        core of "emulations."  They've realized, it appears, that the
  954.        programmer's nightmare might mean their printer won't get sup-
  955.        ported.  So, by building in options to emulate Epson, LaserJet,
  956.        ProPrinter or other popular printers, they can ensure broad
  957.        support for their printers.
  958.  
  959.     About 8 basic emulation modes exist:
  960.  
  961.       1.  Early Epson 9-pin        2.  Later Epson 9-pin
  962.       3.  Epson LQ (24-pin)        4.  IBM Graphics
  963.       5.  IBM Proprinter           6.  Hewlett-Packard Laserjet
  964.       7.  Diablo                   8.  Qume Sprint
  965.  
  966.     Most newer printers emulate at least one of these.  Some emulate 2
  967.     or more.  But printers still exist that use proprietary codes.  This
  968.     printer database will help you manage the vast majority of them.
  969.  
  970.                                                                        
  971.  
  972.  
  973.     =================================================================
  974.  
  975.        Section V:  Using Printer.Exe to Select or Install Printers
  976.  
  977.     =================================================================
  978.  
  979.     As we mentioned, PRINTER.EXE is a multi-purpose program that:
  980.  
  981.      * You may distribute along with your programs (if you wish).
  982.  
  983.      * Compresses printer codes by about 85 percent (and ZIPs to a
  984.        much-smaller file of about 40k).
  985.  
  986.      * Allows users to:
  987.        -- Select a printer from a menu.
  988.        -- Review and edit printer codes.
  989.        -- Save a small file (Printer.Cfg; 2k) to disk with
  990.           appropriate codes for their printer.
  991.  
  992.           YOUR program(s) need only deal with this small "config-
  993.           uration file" to get all the information you'll need
  994.           to drive your user's printer (for the most part).
  995.  
  996.      * Allows YOU to expand the database to its full, fixed-record size
  997.        and format.  You may then use our PDT program to view and edit it.
  998.  
  999.  
  1000.     Selecting a Printer
  1001.     -------------------
  1002.  
  1003.     To select (or install) a printer, you (or your users) would simply:
  1004.  
  1005.      1.  Run Printer.Exe.  Instructions on what to do next always
  1006.          appear at the bottom of your screen.
  1007.  
  1008.  
  1009.      2.  A menu will pop up with the names of hundreds of printers.
  1010.          (On slow PCs it can take a while to load this menu.)
  1011.  
  1012.  
  1013.      3.  TO SELECT A PRINTER, highlight it and press <Enter>.  To
  1014.          exit to DOS, press F10.  To highlight a printer:
  1015.  
  1016.          - Press Down, Up, PgDn, PgUp, End or Home.
  1017.  
  1018.          - Or press the first letter of the manufacturer's name.
  1019.            For example, to view Epson printers, press "E."  If
  1020.            "Epson" is not the first manufacturer whose name begins
  1021.            with "E," press "E" or Down or PgDn until you find Epson.
  1022.  
  1023.          Highlight your printer (or one close to it), then press <Enter>.
  1024.          You'll then have a chance to review and edit the printer codes.
  1025.  
  1026.          NOTE:  If your printer isn't listed in the menu, choose one
  1027.          that's close.  Then review the printer codes and edit them as
  1028.          needed.  And beware that your printer may appear 2 or more
  1029.          times -- if it emulates 1 or more printers.
  1030.                                                       continued . . .    
  1031.  
  1032.  
  1033.     Selecting a Printer (continued)
  1034.  
  1035.  
  1036.      4.  ONCE YOU SELECT A PRINTER, we'll display all printer codes we
  1037.          have for that printer.  This gives you a chance to review or
  1038.          edit them.  Press F10 to select a different printer or to exit.
  1039.  
  1040.          - To REVIEW printer codes, press Down or Up cursor keys.
  1041.  
  1042.          - To EDIT a printer code, press Down/Up to highlight a code,
  1043.            then press <Enter> to indicate you want to edit it.  Edit
  1044.            the code, then press <Enter> again to accept it.
  1045.  
  1046.  
  1047.      5.  IF YOU CHOOSE TO EDIT A CODE, an edit window pops up.  It
  1048.          identifies the code, and, if appropriate, alerts you if the
  1049.          code you're editing contains ASCII character 0.  If you see
  1050.          this message, take care that you don't inadvertently delete
  1051.          Chr$(0) or replace it with a space (Chr$(32)).
  1052.  
  1053.          While editing printer codes:
  1054.  
  1055.          - Press Escape to enter Escape -- ASCII character 27.
  1056.  
  1057.          - Press Ctrl-2 to enter ASCII character 0.
  1058.  
  1059.          - To enter ASCII characters 1-31 or 128-255, hold down ALT,
  1060.            then enter the ASCII number on the numeric keypad.
  1061.  
  1062.          - Press Ctrl-Home to erase a code, or Ctrl-End to erase
  1063.            from the cursor to the end of the line.
  1064.  
  1065.          - Press <Enter> to accept the code as edited.
  1066.  
  1067.  
  1068.     6.  WHILE REVIEWING PRINTER CODES : : :
  1069.  
  1070.          - Press F2 to SAVE printer codes.  Printer.Exe will save the
  1071.            codes (as edited) to Printer.Cfg, and will then exit to DOS.
  1072.            You MUST do this before pressing F10, or any changes you've
  1073.            made will be erased.  The database codes aren't changed.
  1074.  
  1075.            If "Printer.Cfg" already exists, we'll overwrite it!  To
  1076.            prevent this, rename "Printer.Cfg" before running Printer.
  1077.  
  1078.            See Appendix I as well as The_Prn.? for information on how to
  1079.            read Printer.Cfg and use its codes from within your programs.
  1080.  
  1081.            And remember that we also included Edit.Exe in case you (or
  1082.            your users) need to edit the printer codes in Printer.Cfg.
  1083.  
  1084.  
  1085.          - Press F10 to return to the "select a printer" menu.  There
  1086.            you can select another printer, or press F10 to exit to DOS.
  1087.  
  1088.                                                       continued . . .
  1089.                                                                        
  1090.  
  1091.  
  1092.     Editing Printer Codes (continued)
  1093.  
  1094.     NOTES:
  1095.     ------
  1096.  
  1097.      * Because Escape is a valid printer code, we use F10 rather than
  1098.        Escape to back up to the previous menu, or to exit to DOS.
  1099.  
  1100.  
  1101.      * Some printer codes contain ASCII character 0.  Because this
  1102.        looks like a space (character 32), one must take care when
  1103.        editing these codes.  And character 0 cannot be entered as
  1104.        other characters can.
  1105.  
  1106.        - If, when you select a printer code to edit, it contains
  1107.          character 0, we'll display a message urging you to be
  1108.          careful when editing this code.
  1109.  
  1110.        - IBM declared that Chr$(0) be entered as Ctrl-2!  So we've
  1111.          adopted that "standard," such that it is.
  1112.  
  1113.  
  1114.      * Printer.Cfg is a 2k, fixed-length file with space for 70
  1115.        printer codes and their labels.  See the next section for
  1116.        details on using codes in Printer.Cfg.  And see Appendix
  1117.        I for details on the record/field structure of both Printer.Cfg
  1118.        and Printer.Dat (the expanded, fixed-length database).
  1119.  
  1120.  
  1121.      * We have not built in an option to edit the labels associated with
  1122.        each printer code.  In most cases this is okay.  But the final
  1123.        set of codes will all be labelled "User" -- not very descriptive.
  1124.  
  1125.  
  1126.  
  1127.     Using Edit.Exe:  Editing Printer.Cfg
  1128.     ====================================
  1129.  
  1130.     We included Edit to serve a need such as this:
  1131.  
  1132.      * You distribute Printer.Exe and Edit.Exe with your programs.
  1133.  
  1134.      * Your users use Printer to select a printer, and then no longer
  1135.        want to consume it's 130k of disk space.  So they delete it
  1136.        (keeping a backup in case they must install another printer).
  1137.  
  1138.      * But they may need to edit or add printer codes.  So they keep
  1139.        the 9-k Edit.Exe around to edit Printer.Cfg.
  1140.  
  1141.  
  1142.     Edit works just like Printer.Exe does -- except you don't select a
  1143.     printer first.  Edit reads Printer.Cfg (or aborts if Printer.Cfg
  1144.     isn't on the current path).  It then displays the printer codes,
  1145.     lets you edit them, than asks you to press F2 to save them.  Like
  1146.     Printer, Edit will overwrite Printer.Cfg when you save new codes.
  1147.     F10 aborts the edit, leaving the existing Printer.Cfg intact.
  1148.                                                                        
  1149.  
  1150.  
  1151.     Using Printer.Cfg in Your Programs
  1152.     ==================================
  1153.  
  1154.     Be sure to see Appendix I and demo programs (Demo_Prn.?).
  1155.  
  1156.     Printer.Cfg, the printer configuration file saved by Printer.Exe
  1157.     when you select a printer, consists of two, 1024-byte records.
  1158.  
  1159.      * Both records begin with a 44-byte header identifying the
  1160.        printer.  Appendix I describes the header's layout.
  1161.  
  1162.      * The remaining 980 bytes consists of 70, 14-byte fields,
  1163.        1 14-byte field for each printer code.
  1164.  
  1165.        - Record #1 contains descriptions (labels) for each code.
  1166.  
  1167.        - Record #2 contains the actual printer codes.
  1168.  
  1169.  
  1170.     We chose this record format to make it easy, from within your pro-
  1171.     grams, to display all 70 printer codes and their descriptions.
  1172.     Saving the labels will be especially useful when (if) we offer
  1173.     an option letting users change the labels as well as the codes.
  1174.  
  1175.      * With so many printer options to choose from, we've found it
  1176.        helpful in our own programs to display which printer options
  1177.        are available, and what users should do to invoke each.  See
  1178.        Demo_Prn.?. for code that might give you a start here.
  1179.  
  1180.      * If you do display the labels and codes, you might want to offer
  1181.        users a printed description of each code.  14-byte fields con-
  1182.        strain what we can say.  So users might benefit from something
  1183.        that translates our terse abbreviations into something meaningful.
  1184.  
  1185.        Both The_Prn.? and Printer.Dat include fuller descriptions of
  1186.        each code.
  1187.  
  1188.  
  1189.     Using the Printer Codes from Within Your Programs
  1190.     -------------------------------------------------
  1191.  
  1192.     You can use the TYPEs (structures) you'll find in The_Prn.? to load
  1193.     printer codes from Printer.Cfg.  Or, use any 1024-byte variable to
  1194.     read them.  Or, read the 44-byte header, throw it away, then read a
  1195.     980-byte record.  Or set up a 70-element array, then just read (or
  1196.     parse) each code into an element.
  1197.  
  1198.     Finally, just trim trailing spaces (Chr$(32)) from a code and
  1199.     send it to the printer.
  1200.  
  1201.      * Remember to first scan codes for our "placeholder" -- √.  If
  1202.        it exists, you MUST replace it.  NEVER send it to a printer.
  1203.        In a later section, we'll explain how to customize these.
  1204.  
  1205.      * Also, remember to leave Chr$(0)s intact -- in BASIC use
  1206.        RTRIM$, NOT Crescent's qpRTRIM or pdqRTRIM.
  1207.  
  1208.                                                                        
  1209.  
  1210.  
  1211.     Examples  (using BASIC code)
  1212.     --------
  1213.  
  1214.     These examples assume we used the Types/Structures in The_Prn.Inc
  1215.     to read printer codes.  These examples use BASIC's "lprint" or "line
  1216.     print" function.
  1217.  
  1218.  
  1219.      * To INITIALIZE (reset) the printer to power-on mode:
  1220.  
  1221.           lprint rtrim$(ThePrn.Initialize);
  1222.  
  1223.  
  1224.      * To UNDERLINE text:
  1225.  
  1226.           lprint rtrim$(ThePrn.UnderlineON); Text$;
  1227.           lprint rtrim$(ThePrn.UnderlineOFF)
  1228.  
  1229.  
  1230.      * To print text in BOLD:
  1231.  
  1232.           lprint rtrim$(ThePrn.BoldOn); Text$; rtrim$(ThePrn.BoldOff)
  1233.  
  1234.  
  1235.      * To turn on 8 lines-per-inch (8 LPI):
  1236.  
  1237.           lprint rtrim$(ThePrn.LinesPerInch8);
  1238.  
  1239.  
  1240.     That's it!  For the most part, it's that simple.  And you needn't
  1241.     care which printer is installed, or whether users install a dif-
  1242.     ferent printer.
  1243.  
  1244.                                                                       
  1245.  
  1246.  
  1247.     =================================================================
  1248.  
  1249.                     Section III:   Using Printer.Exe
  1250.  
  1251.            Expanding The Printer Database; Creating PRINTER.DAT
  1252.  
  1253.     =================================================================
  1254.  
  1255.     Printer.Exe can create a fixed-length, random-record database.
  1256.  
  1257.      * A new file, PRINTER.DAT, will be created, requiring almost
  1258.        800,000 bytes of disk space.  If Printer.Dat already exists,
  1259.        we'll tell you so and quit.  One way this might happen is if
  1260.        the PDT structure file by the same name exists on the current
  1261.        drive/directory (it should be in PDT.DIR, not where you are).
  1262.  
  1263.        NOTE:  Shareware versions write out only about 45 records.
  1264.               So disk space requirements are much less.
  1265.  
  1266.  
  1267.      * Once expanded, you can easily view and edit Printer.Dat, add
  1268.        records (printers), change or add printer codes, etc.  PDT is
  1269.        an excellent tool for this.
  1270.  
  1271.  
  1272.      * You can also read Printer.Dat from your programs.  But doing
  1273.        so may needlessly consume lots of disk space.  Using the ".Cfg"
  1274.        file from your programs is much more space-efficient.
  1275.  
  1276.  
  1277.      * Please note that once expanded, there's currently no way to
  1278.        re-compress the database and re-create Printer.Exe.
  1279.  
  1280.        - If you add printers, or add codes for certain printers, or
  1281.          change codes, feel free to send us the changes (in 1024-byte
  1282.          records, in the original field-format).  PDT's Block Mark and
  1283.          Block Export options make this an easy task.
  1284.  
  1285.        - We'll be happy to consider re-creating Printer.Exe for you.
  1286.  
  1287.  
  1288.     To Expand the Database
  1289.     ----------------------
  1290.  
  1291.     Verify there's about 1 million bytes of free disk space.  Then type:
  1292.  
  1293.                     printer  rws-54321  (that's a hyphen).
  1294.  
  1295.  
  1296.     We WON'T verify that sufficient disk space is available -- YOU must.
  1297.     As the database expands, we'll show which record number we're on.
  1298.     Record numbers should fly by.  If they slow to a crawl or stop,
  1299.     we probably ran out of disk space.  Press Escape, then check the
  1300.     disk space.  If it's 0, clear some space, then repeat the process.
  1301.                                                                        
  1302.  
  1303.  
  1304.     =================================================================
  1305.  
  1306.               Section IV:   Using Codes with "Placeholders"
  1307.  
  1308.     =================================================================
  1309.  
  1310.     While we've tried to design The Printer to be almost painless,
  1311.     using some printer codes requires some work.  Fortunately, these
  1312.     codes can also yield significant powers and benefits.
  1313.  
  1314.     We mentioned earlier that some printer codes contain "√" (ASCII
  1315.     character 251) -- a placeholder for value(s) you must supply.
  1316.     "√" should NEVER be sent to the printer.  Instead, you must
  1317.     replace "√" with a string value appropriate for your situation.
  1318.  
  1319.     Here are general guidelines for replacing placeholders and using
  1320.     these codes.  To see some of these in action (and masterfully),
  1321.     capture-to-disk a document printed by WordPerfect or Microsoft
  1322.     Word.  Then examine the file in PDT.
  1323.  
  1324.     To use some of these, you need formulas or need to know which
  1325.     units-of-measurement each printer uses.  We've included guidelines
  1326.     for Epson printers and HP LasetJets.  Later we may offer guidelines
  1327.     for other printers.
  1328.  
  1329.     Please note that, with some codes, it's not sufficient to know the
  1330.     printer is an Epson (or emulates one).  Epson CHANGED the meaning
  1331.     of certain codes (eg., Line Spacing) when they introduced the LQ
  1332.     (24-pin, Letter Quality) printers.  So the same printer code can
  1333.     yield different results if you're dealing with an Older 9-pin, a
  1334.     Newer 9-pin or a 24-pin LQ Epson.
  1335.  
  1336.  
  1337.     GENERAL GUIDELINES
  1338.     ==================
  1339.  
  1340.      * "<" means character 27 (Escape) as in "<A√."
  1341.  
  1342.      * Printer codes are strings.  When you replace our placeholder,
  1343.        especially if you send a number, you should do so by sending
  1344.        either:
  1345.  
  1346.         - Its string equivalent (eg., Str$(SomeNumber) in BASIC).
  1347.           LaserJets usually require this string version (eg., <(s9T).
  1348.  
  1349.         - Or a character (eg., Chr$(SomeNumber) in BASIC).  Epson
  1350.           printers usually accept this version (eg., <A + Chr$(19))
  1351.  
  1352.      * In most (but not all) cases if you send an unrecognized printer
  1353.        code, the printer simply ignores it.  So, for example, if you
  1354.        tell an old Epson FX printer to switch to the Orator-S font, it
  1355.        won't know what you mean and simply ignores your request.
  1356.  
  1357.        The main (only?) exceptions to this are the Line Spacing com-
  1358.        mands on Epson printers.  For example, "<3" + Chr$(30) means 6
  1359.        lines-per-inch on LQ printers, but 7.2 LPI on FX printers.
  1360.  
  1361.                                                                        
  1362.  
  1363.  
  1364.     Option                      Epson                LaserJet
  1365.     =======================     ==================   ===================
  1366.  
  1367.     Select Character Sets                           
  1368.     (USA, France, etc.)         <R√                  <(√√   (Symbol Set)
  1369.     --------------------------------------------------------------------
  1370.     Use with:                   Where √ = Chr$(#)    NOTE:  This selects
  1371.                                                      a Symbol Set, and is
  1372.     - Most Epson LQ printers.    0 (USA)             thus not truly equiv-
  1373.                                  1 (France)          alent to Epson logic.
  1374.     - Most newer 9-pin           2 (Germany)         See options below for
  1375.       printer (through #9).      3 (England)         why we placed this here.
  1376.                                  4 (Denmark)         These REQUIRE appro-
  1377.     - Most older 9-pins          5 (Sweden)          priate fonts.
  1378.       (through #6).  Not MX.     6 (Italy)
  1379.                                  7 (Spain)           Where √√ =
  1380.                                  8 (Japan)
  1381.                                  9 (Norway)           8U = Roman-8
  1382.                                 10 (Denmark 2)       10U = PC-8 (w/ line draw)
  1383.                                 11 (Spain 2)         11U = PC-8 DN
  1384.                                 13 (Korea)            8K = Kana-8
  1385.                                 64 (Legal)            8M = Math-8
  1386.                                                       0U = USASCII
  1387.                                                       0B = Line Draw
  1388.                                                       0E = Roman Extension
  1389.                                                       0D/1E/0F/0G/0I/0S/1S =
  1390.                                                            Denmark-Norway, UK,
  1391.                                                            France, Germany,
  1392.                                                            Italy, Sweden-
  1393.                                                            Finland and Spain,
  1394.                                                            respectivly.
  1395.                                                       1U = Legal
  1396.                                                       0N = ECMA-94
  1397.  
  1398.  
  1399.     Select Master Font          <k√                  <(s√T   (Type Face)
  1400.     --------------------------------------------------------------------
  1401.     Use with:                   Where √ = Chr$(#)    Where √ =
  1402.  
  1403.     - LQ printers (except        0 (Roman)           0 (Line printer)
  1404.       LQ-1500 and LQ-2000).      1 (Sans Serif)      1 (Pica)
  1405.       Options 2-8 may require    2 (Courier)         2 (Elite)
  1406.       an optional font module.   3 (Prestige)        3 (Courier)
  1407.                                  4 (Script)          4 (Helvetic)
  1408.     - Newer FXs, use only 0,     5 (OCR B)           5 (Times Roman)
  1409.       1 & 2, and only with:      6 (OCR-A)           6 (Gothic)
  1410.       DFX-500, FX-86/286,        7 (Orator)          7 (Script)
  1411.       FX-850/1050, FX-800/1000,  8 (Orator-S)        8 (Prestige)
  1412.       LX-800/810, T750, Apex-80.                     9 (Caslon)
  1413.                                                     10 (Orator)
  1414.     - NOT applicable with older Epsons.
  1415.  
  1416.  
  1417.  
  1418.                                                                        
  1419.  
  1420.  
  1421.     Option                      Epson                LaserJet
  1422.     =======================     ==================   ===================
  1423.                                                      
  1424.     Master Select               <!√                  Not applicable (n/a)
  1425.     --------------------------------------------------------------------
  1426.     Use with:                   Where √ = Chr$(#)
  1427.  
  1428.     - LQ printers.               0 (Pica)
  1429.                                  1 (Elite)
  1430.        *  NLQ mode required.     2 (Proportional) *
  1431.                                  4 (Condensed)
  1432.        ** Not SQ-2000            8 (Emphasized)
  1433.                                 16 (Double Strike)**
  1434.                                 32 (Double-Wide)
  1435.     - With newer FXs, many      64 (Italic)
  1436.       are available in Draft   128 (Underline)
  1437.       mode only (not NLQ),
  1438.       and Proportional, Italic
  1439.       and Underline may not be
  1440.       available this way.  Use
  1441.       other codes for this.
  1442.  
  1443.     - Many are NOT applicable with older 9-pin Epsons.
  1444.  
  1445.  
  1446.     Variable Line Spacing       <A√                   <&l√D
  1447.     --------------------------------------------------------------------
  1448.                                 Where √ = Chr$(#)     Where √ =
  1449.  
  1450.                                 LQ:  #/60 inch        1, 2, 3, 4, 6, 8,
  1451.                                 FX:  #/72 inch        12, 16, 24 or 48
  1452.                                                       lines-per-inch.
  1453.                                 Replace √ with a
  1454.                                 character.  For
  1455.                                 example, for 3/60"
  1456.                                 use "<A" + Chr$(3).
  1457.  
  1458.                                 NOTE:  This is 1/3 the
  1459.                                 resolution of <3√ below.
  1460.  
  1461.  
  1462.     Alternate Variable Line     <3√                   <&l√C
  1463.       Spacing
  1464.     --------------------------------------------------------------------
  1465.                                 Where √ = Chr$(#)     Where √ =
  1466.  
  1467.                                 LQ:  #/180 inch       The number of 1/48
  1468.                                 FX:  #/216 inch       inch increments per
  1469.                                                       line.  For example:
  1470.                                 For example, for
  1471.                                 4 lines/inch:         "<&l6C" = 6/48 = 1/8
  1472.                                                       or 8 lines/inch.
  1473.                                 LQ:  "<3" + Chr$(45)
  1474.                                 FX:  "<3" + Chr$(54)
  1475.  
  1476.                                 NOTE:  This is 3-times
  1477.                                 the resolution of <A√.
  1478.                                                                        
  1479.  
  1480.  
  1481.     Option                      Epson                LaserJet
  1482.     =======================     ==================   ===================
  1483.  
  1484.     Page Length: Inches         <C + Chr$(0) + √      n/a
  1485.     --------------------------------------------------------------------
  1486.                                 Where √ = Chr$(#)
  1487.  
  1488.                                 A character from
  1489.                                 Chr$(1) to Chr$(22)
  1490.                                 indicating 1 - 22 inches.
  1491.  
  1492.  
  1493.     Page Length: Lines          <C√                   <&l√P
  1494.     --------------------------------------------------------------------
  1495.                                 Where √ = Chr$(#)     Where √ =
  1496.  
  1497.                                 A character from      The number of lines
  1498.                                 Chr$(1) to Chr$(127)  on the page (using
  1499.                                 indicating 1 - 127    the currently-selected
  1500.                                 lines.                line spacing).
  1501.  
  1502.                                                       NOTE:  When Laser-
  1503.                                                       Jets receive this
  1504.                                                       code, they RESET
  1505.                                                       Top Margin, Text
  1506.                                                       Length, and Left/
  1507.                                                       Right Margins.  So
  1508.                                                       set Page Length 1st.
  1509.  
  1510.  
  1511.     Set Tab Stops               <D√√√√√√√√+Chr$(0)   n/a
  1512.     --------------------------------------------------------------------
  1513.                                 Where EACH √ =       Use <&a√C to jump
  1514.                                                      to any column --
  1515.                                 Chr$(1) to Chr$(?)   based on the pitch
  1516.                                                      of the "current" font.
  1517.                                 - "?" = 137 for 80-
  1518.                                   column printers.   NOTE:  See "Absolute
  1519.                                                      Move to a Horizontal
  1520.                                 - "?" = 233 for      Position" for a pitch-
  1521.                                   wide-carriage      independent way to
  1522.                                   printers.          move right/left.
  1523.  
  1524.                                 NOTE:  The values
  1525.                                 you use depend on
  1526.                                 the pitch of the
  1527.                                 current font.
  1528.                                  - Pica = 10 CPI
  1529.                                  - Elite = 12 CPI
  1530.                                  - Condensed = 15 CPI
  1531.  
  1532.                                 The ending Chr$(0)
  1533.                                 is REQUIRED!
  1534.  
  1535.                                 When a TAB (Chr$(9)) is
  1536.                                 issued, printing starts
  1537.                                 at the NEXT column -- not
  1538.                                 the one you specified!                 
  1539.  
  1540.  
  1541.  
  1542.     Option                      Epson                LaserJet
  1543.     =======================     ==================   ===================
  1544.  
  1545.     Set Top Margin              n/a                   <&l√E
  1546.     --------------------------------------------------------------------
  1547.                                                       Where √ =
  1548.  
  1549.                                                       1, 2, etc. for the
  1550.                                                       line number (using
  1551.                                                       the current line
  1552.                                                       spacing).
  1553.  
  1554.                                                       NOTE:  The top and
  1555.                                                       bottom 1/2 inch (about
  1556.                                                       2 lines) is an "un-
  1557.                                                       printable" area. Print-
  1558.                                                       ting here results in
  1559.                                                       lost data.  HP recom-
  1560.                                                       mends a minimum of 2.
  1561.  
  1562.  
  1563.     Set Bottom Margin           n/a                   n/a
  1564.     --------------------------------------------------------------------
  1565.                                                       NOTE: The bottom
  1566.     Note:  This is a curiosity.                       margin equals:
  1567.  
  1568.     It's NOT relevant on page-                              Page Length
  1569.     oriented laser printers.                          minus Top Margin
  1570.                                                       minus Text Length
  1571.     It IS used on some non-Epson
  1572.     dot-matrix printers.  But                         Skip Perforation
  1573.     often, you have to go down                        is useful to print
  1574.     there, then say "this is the                      beyond line 60!  I
  1575.     bottom."                                          recommend you ALWAYS
  1576.                                                       use Skip Perf., then
  1577.     We included it here for                           control how far down
  1578.     completeness, even though                         you go.  Since Lasers
  1579.     it's irrelevant for these                         enjoy spitting the
  1580.     groups of printers.                               page out when you hit
  1581.                                                       line #60 (while many
  1582.                                                       printers happily accept
  1583.                                                       64 lines), Skip Perf.
  1584.                                                       helps you tame this
  1585.                                                       prediliction.
  1586.  
  1587.  
  1588.  
  1589.     Set Left Margin             <l√                   <&a√L
  1590.     --------------------------------------------------------------------
  1591.                                 Where √ = Chr$(#),    Where √ = a column
  1592.                                 a column number.
  1593.  
  1594.                                 NOTE:  That's a       - The 1st column is
  1595.                                 lower case L, not       column #0.
  1596.                                 the number "1."
  1597.  
  1598.                                                                        
  1599.  
  1600.  
  1601.     Option                      Epson                LaserJet
  1602.     =======================     ==================   ===================
  1603.  
  1604.     Set Right Margin            <Q√                   <&a√M
  1605.     --------------------------------------------------------------------
  1606.                                 Where √ = Chr$(#),    Where √ = a column
  1607.                                 a column number.      number.
  1608.  
  1609.                                 Minimum and maximum   - The 1st column is
  1610.                                 values differ depend-   column #0.
  1611.                                 on both the pitch and
  1612.                                 the carriage width.   - Column positions
  1613.                                                         vary with the pitch
  1614.                                                         of the current font.
  1615.  
  1616.  
  1617.     ABSOLUTE Move to a          n/a                   <&a√V
  1618.       VERTICAL Location
  1619.     --------------------------------------------------------------------
  1620.                                                       Where √ = the new
  1621.     Example:  Move to row 5.                          vertical location in
  1622.                                                       1/720 inch increments.
  1623.  
  1624.                                                       Example:  "<&a600V"
  1625.                                                       jumps to line # 5
  1626.                                                       (600/720 = .83 or line
  1627.                                                       5 at 6 lines-per-inch).
  1628.  
  1629.     LaserJet Notes:  <&√R moves to a specific row -- but dependent on
  1630.                      the current line spacing.  <&a√V is invulnerable
  1631.                      to user changes in line spacing.
  1632.  
  1633.  
  1634.     RELATIVE Move to a          n/a                   <&a√√V
  1635.       VERTICAL Location
  1636.     --------------------------------------------------------------------
  1637.                                                       Use the same code(s) as
  1638.     Example:  Move UP 3 lines.                        above but with "+" or
  1639.                                                       "-" before √, to move
  1640.                                                       down or up, respectively.
  1641.  
  1642.  
  1643.     ABSOLUTE Move to a          <$√√                  <&a√H
  1644.       HORIZONTAL Location
  1645.     --------------------------------------------------------------------
  1646.                                 This begins           Where √ = the new
  1647.     Epson:  Newer LQ only.      printing from         horizontal location in
  1648.                                 the left margin       1/720 inch increments.
  1649.     Example:  Move to           in 1/60 inch
  1650.     column 14.                  increments.           Example:  "<&a1080H"
  1651.                                                       jumps to column # 14
  1652.                                 # of dots =           (1080/720 = 1.4 inches
  1653.                                 n1 + (n2 * 256).      or column 14 at 10
  1654.                                                       characters-per-inch).
  1655.  
  1656.     LaserJet Notes:  <&√C moves to a specific column -- but is dependent on
  1657.                      the pitch of the current font.  <&a√H is invulnerable
  1658.                      to font pitch.                                    
  1659.  
  1660.  
  1661.     Option                      Epson                LaserJet
  1662.     =======================     ==================   ===================
  1663.  
  1664.  
  1665.     RELATIVE Move to a          <\√√                  <&a√√H
  1666.       HORIZONTAL Location                             
  1667.     --------------------------------------------------------------------
  1668.  
  1669.     Epson:  New LQ only.        To determine the      Use the same code(s)
  1670.                                 2 numbers, first      as above but with "+"
  1671.                                 calculate the dis     or "-" before √, to
  1672.     Example:  Move 5 columns    placement in dots.    move right or left,
  1673.     right.                      - If moving left,     respectively.
  1674.                                   subtract this
  1675.                                   number from 65536.
  1676.  
  1677.  
  1678.                                 Send the resulting
  1679.                                 number using the
  1680.                                 formula:
  1681.  
  1682.                                 # of dots =
  1683.                                 n1 + (n2 * 256)
  1684.  
  1685.                                 A dot is 1/120 inch in
  1686.                                 Draft, and 1/180 inch
  1687.                                 in Letter Quality or
  1688.                                 Proportional modes.
  1689.  
  1690.  
  1691.     Set Inter-Character         <+ Chr$(32) + √       <&k√H
  1692.       Spacing
  1693.     --------------------------------------------------------------------
  1694.  
  1695.     Note:  Change distance      Where √ = Chr$(#)     Where √ = the
  1696.     between characters.         indicating the        number of 1/120
  1697.                                 number of dots to     inch increments
  1698.     Epson:  New LQ only.        move right after      between characters.
  1699.                                 each character.
  1700.                                                       Example:  <&k12H
  1701.                                 A dot is 1/120 inch   sets 10 characters
  1702.                                 in Draft, and 1/180   per inch (12/120 = 10).
  1703.                                 inch in Letter
  1704.                                 Quality or Propor-    With proportional fonts,
  1705.                                 tional modes.         only SPACE is affected.
  1706.  
  1707.  
  1708.                                                                        
  1709.  
  1710.  
  1711.     =================================================================
  1712.  
  1713.         Appendix  I:  The Record Structure of Printer Data Files
  1714.  
  1715.     =================================================================
  1716.  
  1717.  
  1718.     Record Length
  1719.     -------------
  1720.  
  1721.     Both Printer.Dat and Printer.Cfg consists of 1024-byte records.
  1722.     The_Prn.? and Printer.Dat both describe the record/field layout.
  1723.  
  1724.  
  1725.     If you open PRINTER.DAT in PDT (Ctrl-O), PDT should automatically
  1726.     format your view of it into logical rows and columns.
  1727.  
  1728.      * This ONLY happens if the PDT structure file we included (also
  1729.        called Printer.Dat) is in PDT's special directory:  PDT.DIR.
  1730.  
  1731.      * If PDT does NOT automatically format your view, it couldn't find
  1732.        Printer.Dat in PDT.DIR.  We urge you to put it there, then run
  1733.        PDT again.  Or, you could run PDT, open the file, and press
  1734.        Ctrl-L and enter 1024 to tell PDT the record length.  This sets
  1735.        the record length, but WON'T give you field names, values, etc.
  1736.  
  1737.  
  1738.     Note:  If you open Printer.Cfg in PDT, PDT will NOT automatically
  1739.     format your view of it -- unless it finds a "structure" file in
  1740.     PDT.DIR called "Printer.Cfg."  You could:
  1741.  
  1742.      * Just copy the structure file we sent:  copy printer.dat *.cfg.
  1743.        We urge you to do this so that every time you open a ".Cfg" file,
  1744.        PDT will lay it out for you automatically.
  1745.  
  1746.      * Or, once you load the ".Cfg" file into PDT, then press F5 and
  1747.        load the structure file called "Printer.Dat."
  1748.  
  1749.  
  1750.     Record #    Description
  1751.     --------    -----------------------------------------------------
  1752.  
  1753.      1-5        Reserved.  These contain our copyright, notes on the
  1754.                 format of each record, labels for each field, and room
  1755.                 for expansion.
  1756.  
  1757.                 Note:  We always find need to add things to databases
  1758.                 once created.  So reserving room to expand into
  1759.                 minimizes the chances we'll have to render someone's
  1760.                 existing database obsolete!  Please leave these intact,
  1761.                 or at least plan for them to be included in future
  1762.                 versions -- that is, begin reading at record 6.
  1763.  
  1764.      6-###      One record for each printer, listed alphabetically.
  1765.  
  1766.                 Some printers may have 2 or more records if they offer
  1767.                 2 or more emulations.
  1768.                                                                        
  1769.  
  1770.  
  1771.     Field Structure
  1772.     ---------------
  1773.  
  1774.     "The_Prn.?" contains two TYPEs (or structures) you can use to under-
  1775.     stand the codes and read them from within QB programs.  The PDT
  1776.     structure file, Printer.Dat, contains similar data.
  1777.  
  1778.     Most fields in both Printer.Dat or Printer.Cfg are 14 bytes.
  1779.     The exceptions are fields 1 and 2.  Field #1 is a 1-byte field
  1780.     reserved for our use in development.  Field #2 is 15 bytes and
  1781.     contains the name of the manufacturer of the printer (e.g., Epson,
  1782.     Star, Xerox, etc.).
  1783.  
  1784.  
  1785.     The first 44 bytes of each printer record is a header identifying
  1786.     the printer.  Thus the first TYPE in The_Prn.? is PrnHeader.  We use
  1787.     separate TYPEs for the header and the codes to give you flexibility
  1788.     and to minimize memory usage (use the header only when needed).
  1789.  
  1790.         # of
  1791.         Bytes     Contents
  1792.        -------    ------------------------------------------------
  1793.  
  1794.           1       Reserved (used in development)
  1795.  
  1796.          15       Manufacturer (eg., Epson)
  1797.  
  1798.          14       Model (eg., FX-286)
  1799.  
  1800.          14       Emulation mode (eg., printer emulates an Epson LQ)
  1801.  
  1802.  
  1803.     The remaining 980 bytes consist of 70 14-byte printer codes.  So
  1804.     the 2nd TYPE in The_Prn.? is ThePrn.  Review it and you'll see:
  1805.  
  1806.  
  1807.         # of
  1808.         Bytes     Contents
  1809.        -------    ------------------------------------------------
  1810.  
  1811.          14       Initialize (reset) printer
  1812.           .       Set 10 Characters-per-inch (10 CPI)
  1813.           .       Set 12 CPI
  1814.           .       Set Condensed print On
  1815.           .       Turn Condensed print Off
  1816.           .       .
  1817.           .       .
  1818.           .       etc.
  1819.  
  1820.     Review The_Prn.? or Printer.Dat for the order and descriptions of
  1821.     each code.  Labels are also included in the database.  And PDT will
  1822.     display column headings IF:  it finds its structure file (also
  1823.     called Printer.Dat), and you press Ctrl-D (Display Field Labels).
  1824.  
  1825.                                                                        
  1826.  
  1827.  
  1828.     =================================================================
  1829.  
  1830.             Appendix II:  Using PDT to View and Edit ANY File
  1831.  
  1832.     =================================================================
  1833.  
  1834.     PDT comes with both extensive on-line help, plus an on-disk manual.
  1835.     But here are the basics you'll need to take full advantage of PDT
  1836.     when viewing Printer.Cfg or Printer.Dat (and some other files).
  1837.  
  1838.     Installation
  1839.     ============
  1840.  
  1841.     1.  Install PDT in a directory on your path, or in it's own
  1842.         directory (then add PDT's path to your PATH statement).
  1843.  
  1844.     2.  BE SURE that PDT's special subdirectory (PDT.DIR) is created
  1845.         off the directory containing PDT.EXE.  PDT's "install" program
  1846.         will do this for you.  But if you didn't use Install, be sure
  1847.         to:  md pdt.dir.
  1848.  
  1849.     3.  Also BE SURE to copy the structure file "Printer.Dat" to
  1850.         PDT.DIR.  Install.Exe won't do this for you since it's not
  1851.         part of PDT.
  1852.  
  1853.         - Make a copy of this file, but with a ".Cfg" extension:
  1854.  
  1855.                    copy printer.dat *.cfg.
  1856.  
  1857.     Opening a File
  1858.     ==============
  1859.  
  1860.     1.  MOVE to the path where you've installed The Printer.
  1861.  
  1862.         - Run Printer.Exe and select a printer (try an Epson).
  1863.           BE SURE to press F2 so we save Printer.Cfg.
  1864.  
  1865.         - Also, if you like, run Printer.Exe and expand the
  1866.           database to it's fixed-length format.
  1867.  
  1868.     2.  Run PDT like this:      pdt printer.cfg   <enter>
  1869.  
  1870.                            or,  pdt printer.dat   <enter>
  1871.  
  1872.         - IF you followed step 3 above, either command should yield
  1873.           a display of logical rows and columns.
  1874.  
  1875.         - Fields will be displayed in alternating colors.  As you TAB
  1876.           from field to field, notice near the bottom of your screen:
  1877.  
  1878.           -- FIELD:  will change to show you which field you're in.
  1879.  
  1880.           -- VALUE:  will show the "value" of the field you're in.
  1881.              This is especially useful with packed binary numerics.
  1882.  
  1883.         - Press Ctrl-D.  PDT will display column labels atop the file
  1884.           window showing what's ahead of and what's behind your cursor.
  1885.                                                                        
  1886.  
  1887.  
  1888.     Managing Other Files
  1889.     ====================
  1890.  
  1891.     1.  Close the file (Ctrl-C), then open one of your own (Ctrl-O).
  1892.  
  1893.         If you have a dBase file, try it first.  If your dBase
  1894.         file does NOT have a ".DBF" extension, press Alt-O and
  1895.         select "Force dBase" from the Options menu.
  1896.  
  1897.     2.  Now for some fun!  Make a COPY of a fixed-length, random file
  1898.         with BINARY NUMERIC fields in it.  Now open the copy (Ctrl-O).
  1899.  
  1900.         - Press Ctrl-L and enter the Record Length.
  1901.  
  1902.         - Press Home, then press F2.  Press a letter indicating the
  1903.           Field Type:  <c>haracter, <i>nteger, <l>ong, etc.
  1904.  
  1905.           Press <Enter> and enter a label or description.
  1906.  
  1907.           Press <Enter> again, then move the cursor to the next field.
  1908.           Press F2 again, then repeat this process.
  1909.  
  1910.           Continue this until you have AT LEAST 1 numeric field defined.
  1911.  
  1912.           PRESS F4 and SAVE this structure -- with the SAME NAME as your
  1913.           data file.  PDT saves it to PDT.DIR so it won't overwrite data.
  1914.  
  1915.     3.  Now move your cursor to a numeric field you defined (TAB or
  1916.         Shift-Tab can now get you there quickly).
  1917.  
  1918.         -- Note "Value" at the bottom of the screen.  Now move up or
  1919.            down the column and watch "Value" change.
  1920.  
  1921.         -- Stop at some number and WRITE DOWN its value.  Now press
  1922.            Ctrl-E (Edit ON), then press F6.  Enter a new number and
  1923.            press <Enter>.
  1924.  
  1925.            If you followed these steps, you should have just edited
  1926.            a packed binary field in easy-to-understand ASCII.  When
  1927.            you pressed <Enter> PDT saved the binary version to disk.
  1928.  
  1929.         -- Now press F6 again and enter the original number you wrote down.
  1930.  
  1931.     4.  Close the file (Ctrl-C).  Now immediately re-open it.  IF, in
  1932.         step 3 above, you pressed F4 to save the structure, PDT will
  1933.         open your file with everything mapped out for you!
  1934.  
  1935.  
  1936.     IF YOU FOLLOWED THESE SIMPLE STEPS, you've just seen two of PDT's
  1937.     most useful functions.
  1938.  
  1939.      * PDT can (with your help) turn almost any fixed-length file into
  1940.        logical, easily-edited rows and columns.  You can TAB from field
  1941.        to field to view or edit fields.  And you can easily determine or
  1942.        edit field values -- even packed binary fields.
  1943.  
  1944.      * PDT can "automate" this, provided you save structure files.
  1945.                                                                        
  1946.  
  1947.  
  1948.     Advanced Options
  1949.     ================
  1950.  
  1951.     And if you're concerned that if you ADD printer codes to YOUR
  1952.     database, AND we send you an update, that you won't be able to
  1953.     merge your stuff with ours:
  1954.  
  1955.  
  1956.      * BE SURE to try Column Block Mark (Ctrl-M) then Block Copy (Ctrl-W).
  1957.  
  1958.        You can EASILY open your customized file in one window, then open
  1959.        an update we send you in another window, then simply paste an
  1960.        entire column (or 2, 3, or ? columns) of codes from one file and
  1961.        into the column(s) of another file!
  1962.  
  1963.  
  1964.     Also try:
  1965.  
  1966.      * Block Mark and Block Export.
  1967.  
  1968.  
  1969.      * Delete a record:  With Edit on, press Ctrl-B to mark a record,
  1970.        then press <Delete>.
  1971.  
  1972.  
  1973.      * Or try record insert:  With Edit on, press Home then Insert.
  1974.  
  1975.  
  1976.      * Finally, open Sample_2.Dat and check out the EBCDIC options.
  1977.  
  1978.  
  1979.     Just to emphasize what's probably obvious by now, PDT does NO
  1980.     buffering.  What you change is immediately written to disk.
  1981.  
  1982.      * That's the main reason it can help you edit ANY SIZE file --
  1983.        up to 2 gigs.
  1984.  
  1985.      * That's also why we urge you to experiment on a COPIES of files.
  1986.  
  1987.      * And that's why Edit mode is OFF be default.  You must turn Edit
  1988.        ON before you can change anything.
  1989.  
  1990.                                                                        
  1991.  
  1992.      To Register or Order
  1993.      ==================================================================
  1994.  
  1995.      Because we offer so many programs, our order form has 2 pages.
  1996.      Please read CATALOG.DOC for descriptions of each program.
  1997.  
  1998.       * THIS PAGE lists our programs and the per-copy cost of each.
  1999.  
  2000.       * THE NEXT PAGE is the actual order form.
  2001.  
  2002.         - On the next page, fill in the name of each program you're
  2003.           ordering.  PLEASE BE CAREFUL here and use the names listed
  2004.           below.  If we're not sure which program you're ordering,
  2005.           we may have to return you're order.
  2006.  
  2007.         - If ordering by Visa or MasterCard, fill in the section
  2008.           for credit card orders.  BE SURE TO SIGN it.
  2009.  
  2010.        Program Name                                          Per Copy
  2011.        ==============================================================
  2012.        Multi-Print      $29 if ordered w/ ANY other program  $39/$29
  2013.  
  2014.        The Printer      Programmer's Printer Code Database     $49
  2015.  
  2016.        Font Pak "Pro"   Programmer's Fonts & Mouse Shapes      $49
  2017.  
  2018.        Font Pak "DOS"   Hundreds of DOS text-mode fonts        $29
  2019.  
  2020.        PDT              The Pro~Formance Data Tool            $139
  2021.  
  2022.        inform-Z         Professional Forms Design/Database     $49
  2023.  
  2024.        Mail Call        With MC Express                        $49
  2025.          "    "         Without MC Express                     $40
  2026.  
  2027.        Pro~Scribe & PS Express                                 $39
  2028.  
  2029.        P~F Presents     Professional                           $79
  2030.         "     "         Plus (with intro. copyright)           $49
  2031.  
  2032.        P-Screen Professional                                   $49
  2033.            "    Plus                                           $29
  2034.  
  2035.        Pro~Stamp        Stamp Collection Manager               $29
  2036.  
  2037.        Ram-Man          RAM-resident Text File Browser         $19
  2038.  
  2039.        Sparkle AND Menu Magic                                  $29
  2040.  
  2041.        The Survey Catalyst                                    $495
  2042.  
  2043.      =================================================================
  2044.      PACKAGE DISCOUNTS  Call about quantity discounts & site licenses.
  2045.      =================================================================
  2046.        THE WORKS!  One of each program (except The Catalyst)  $349
  2047.        inform-Z AND Mail Call                                  $79
  2048.        P-Screen Pro AND P~F Presents  (Pro versions of both)  $109
  2049.                                                                      
  2050.  
  2051.  
  2052.      ============================= TO  ORDER  =============================
  2053.  
  2054.      For FASTEST delivery of your programs, CALL with a Visa/MC card number.
  2055.  
  2056.  
  2057.      F __________________________________________   M    Rob W. Smetana
  2058.                                                          Pro~Formance
  2059.      R __________________________________________   A T  132 Alpine Terrace
  2060.                                                          San Francisco, CA
  2061.      O __________________________________________   I O      94117
  2062.                                                          (415) 863-0530
  2063.      M __________________________________________   L
  2064.                                                          Make checks payable
  2065.      Phone (     ) ______-________ Date ___/___/___      to:  Rob W. Smetana
  2066.  
  2067.      =======================================================================
  2068.                            For Visa or MasterCard Orders
  2069.      =======================================================================
  2070.  
  2071.      Credit Card Number:  ________________________________  Expires: ___|___
  2072.  
  2073.      Signature (Required for credit card orders): __________________________
  2074.  
  2075.      Be sure your name at the top matches how it appears on your credit card.
  2076.  
  2077.      ============================================================ prn 1.4 ==
  2078.  
  2079.      Name of Program or "Package"         # of Copies  Price/Copy    Total
  2080.  
  2081.      =======================================================================
  2082.  
  2083.      Multi-Print ($29 if ordered /w other pgm) _____  x  $29/$39 =  $_______
  2084.  
  2085.      _____________________________________  ________  x  ______  =  $_______
  2086.  
  2087.      _____________________________________  ________  x  ______  =  $_______
  2088.  
  2089.      =======================================================================
  2090.  
  2091.      Shipping & Handling: Total Number        @ $4/copy (US/Canada)
  2092.      of Programs (and Copies)  ----->>   _____@ $8/copy (Elsewhere) $ ______
  2093.      =============================+=========================================
  2094.                                   |                     Subtotal  $ ________
  2095.       INTERNATIONAL ORDERS: : :   |
  2096.                                   |    CA. residents, add 8.5% tax $ _______
  2097.       * US funds only please.     +-----------------------+-----------------
  2098.       * Money order, check drawn a                        |
  2099.         US bank, or VISA/MasterCard                       |TOTAL  $ ________
  2100.      =====================================================+=================
  2101.  
  2102.      WHERE did you got your copy of our program? _________________________
  2103.      This helps us learn the best way to get new programs to you.  And feel
  2104.      free to write comments and suggestions on the other side.   Thank you.
  2105.  
  2106.     
  2107.