UPD Mail Archive: Re: UPD> completeness: commands generation

Re: UPD> completeness: commands generation (xpdo)

From: Jim Lo (Jim.Lo@eng.sun.com)
Date: Fri Dec 01 2000 - 15:13:40 EST

  • Next message: Jim Lo: "Re: UPD> completeness: commands generation (xpdo)"

    Hi,

    Per Norbert Schade's request, I am trying to exchange what many of us
    working for Sun Microsystem think in many areas of printer description
    in terms of what may be a must and the possible solutions from the perspectives
    of looking for a "long term" solution for universal (raster-based) printing services
    (framework and drivers) under Unix and other platforms.

    As a new late comer, I am not sure it is a good way or a good timing now but I am doing it anyway ...

    The first thing I'd like to discuss is the requirement in printer description for run-time evaluation
    to generate raster data and printer setup commands. I have an impression that it had been brought up
    to UPDF's attention in the past (by Don Wright of Lexmark?) for the "completeness" of any page description file
    or otherwise those commands would need to be "hard-coded" somewhere else in C code for which
    the programming interface needs to be defined (and therefore must be covered as part of UPDF?).

    Attached (xpdo.nov01.html) for your reference please find the extensible printer description object model
    based on XML technologies. It is a very simple virtual machine for XML-based printer description language
    in an attempt to address those command generation issues in addition to custom declaration, modulization and
    binary encoding etc.

    My appology that GPD teminologies are used in the document for a demonstration because GPD is
    the only printer description format I know of that generates raster data for low-cost printers.

    Table of Content:
    -----------------

       Introduction
       Data Types: string, name, int, float, boolean, array, dictionary
       File Modulization for Printer Model Family Hierarchies
       Executable Objects and Execution Context
       The load Executable Object and Paramter Dictionaries
       The switch Executable Object
       The Math Executable Objects: idiv, add, sub, expr
       The Formatter Executable Objects: tostring, numformat, maxrepeat

    Samples in the document:
    ------------------------

    - for raster data commands generation:

      <CmdSendBlockData> <!-- pre-definded parameter: NumOfDataBytes -->
           <maxrepeat> <!-- an executable object that describes how a CmdSendBlockData is
                            generated with a value-range encoding limit -->
                <int>5100</int> <!-- limit -->
                <load name="NumOfDataBytes"> <!-- total -->
                <tostring> <!-- 3rd executable object to be repeatedly evaluated -->
                   <str>{1B}*{03}</str>
                   <expr str="numformat(MaxRepeatInstance,'l')"/>
                </tostring>
           </maxrepeat>
       </CmdSendBlockData>

       <CmdYMoveRelUp> <!-- pre-definded parameter: DestYRel -->
           <maxrepeat> <!-- an executable object that describes how a CmdSendBlockData is
                            generated with a value-range encoding limit -->
                <int>12600</str> <!-- limit -->
                <load name="DestYRel"/> <!-- total -->
                <tostring> <!-- 3th executable object to be repeatedly evaluated -->
                    <str>{1B}(*p-</str>
                    <load name="MaxRepeatInstance"/>
                </tostring>
           </maxrepeat>
       </CmdYMoveRelUp>

    - for multiple-way runtime dependency (e.g., a printable area depends on the paper size and perhaps the orientation
    chosen at runtime):

    <PaperSize>
       <Name str="Paper Size"/>
       <Options>
          <A4>
             <Name str="A4, 210 x 297 mm"/>
             <PrintableOrigin>
                <switch name="Orientation"> <!-- returning an integer object as the
                                               associated with the Orientation key
                                               in the system setup dictionary
                                            -->
                   <case name="PORTRAIT" intary="300 300"/>
                   <case name="LANDSCAPE_CC90" intary="200 180"/>
                   <default intary="180 200"/>
                </switch>
             </PrintableOrigin>
             <!-- ... -->
          </A4>
          <!-- ... -->
       </Options>
       <!-- ... -->
    </PaperSize>

    - for Custom feature/option (e.g. paper size):

    <PaperSize>
       <Options>
          <A4>
             <Name str="A4, 210 x 297 mm"/> <!-- Display name is optional for predefined paper size -->
             <PrintableOrigin intary="..."/> <!-- required for any paper size -->
             <!-- ... -->
          </A4>
          <entry name="MyCustomPaperSize">
             <Name str="My Custom Paper Size: x by y"/> <!-- Display name is required only for custom paper size -->
             <PrintableOrigin intary="..."/> <!-- required for any paper size -->
             <PageDimensions intary="..."/> <!-- required only for unknown custom paper size -->
             <!-- ... -->
          </entry>
          <!-- ... -->
       </Options>
       <!-- ... -->
    </PaperSize>

    Best regards,

    Jim Lo (jim.lo@eng.sun.com)
    Internet Appliance Group
    Sun Microsystems, Inc.
    Menlo Park, California



    This archive was generated by hypermail 2b29 : Fri Dec 01 2000 - 15:14:57 EST