<PAGE>

                                                                 
                                                                 EXHIBIT 10.23

                                                                EXECUTION COPY

                           STOCKHOLDERS AGREEMENT

          STOCKHOLDERS AGREEMENT dated as of October 6, 1998, among GRETAG
IMAGING GROUP, INC., a Delaware corporation ("Purchaser"), GRETAG ACQUISITION
                                              ---------                      
CORP., a Delaware corporation and wholly owned subsidiary of Purchaser  ("Merger
                                                                          ------
Sub") and the individuals and other parties listed on Schedule A attached hereto
---                                                                             
(each, a "Stockholder" and, collectively, the "Stockholders").
          -----------                          ------------   

          WHEREAS Purchaser, Merger Sub and Raster Graphics, Inc., a Delaware
corporation (the "Company"), propose to enter into an Agreement and Plan of
                  -------                                                  
Merger dated as of the date hereof (as the same may be amended or supplemented,
the "Merger Agreement") providing for the merger of Merger Sub with and into the
     ----------------                                                           
Company (the "Merger") pursuant to which each share of common stock, par value
              ------                                                          
$0.001 per share, of the Company (the "Common Stock") will be converted into the
                                       ------------                             
right to receive cash in the amount of $1.2968 per share, without interest (the
"Merger Consideration");
 --------------------   

          WHEREAS each Stockholder owns the number of shares of Common Stock set
forth opposite his or its name on Schedule A attached hereto (such shares of
Common Stock, together with any other shares of capital stock of the Company
acquired by such Stockholders after the date hereof and during the term of this
Agreement (including, without limitation through the exercise of any stock
options, warrants or similar instruments), being collectively referred to herein
as the "Subject Shares");
        --------------   

          WHEREAS, as an essential condition and inducement to their willingness
to enter into the Merger Agreement, Purchaser and Merger Sub have requested that
each Stockholder enter into this Agreement, and each Stockholder has agreed to
do so; and

          WHEREAS, capitalized terms used herein without definition shall have
the respective meanings specified therefor in the Merger Agreement.

          NOW, THEREFORE, to induce Purchaser and Merger Sub to enter into, and
in consideration of their entering into, the Merger Agreement, and in
consideration of the premises and the representations, warranties and agreements
contained herein, the parties agree as follows:

          1.  Representations and Warranties of each Stockholder.  Each
              --------------------------------------------------       
Stockholder hereby, severally and not jointly, represents and warrants to
Purchaser and Merger Sub as of the date hereof in respect of himself or itself
as follows:
<PAGE>
 
          (a)  Authority.  The Stockholder has all requisite power and authority
               ---------                                                        
     to enter into this Agreement and to consummate the transactions
     contemplated hereby.  This Agreement has been duly and validly authorized,
     executed and delivered by the Stockholder and constitutes the valid and
     binding obligation of the Stockholder enforceable against such Stockholder
     in accordance with its terms.  Neither the execution and delivery by the
     Stockholder of this Agreement nor the consummation by the Stockholder of
     the transactions contemplated hereby will violate or conflict in any
     material respect with, result in a breach of any material provision of or
     constitute a default under,  any of the terms, conditions or provisions of
     any note, bond, mortgage, indenture, deed of trust or any material license,
     franchise, permit, lease, contract, agreement or other instrument,
     commitment or obligation to which the Stockholder is a party or by which
     the Stockholder is bound.  No trust of which such Stockholder is a trustee
     requires the consent of any beneficiary to the execution and delivery of
     this Agreement or to the consummation of the transactions contemplated
     hereby.

          (b)  The Subject Shares.  The Stockholder is the record and beneficial
               ------------------                                               
     owner of, or is trustee of a trust that is the record holder of, and whose
     beneficiaries are the beneficial owners of, and has good and marketable
     title to, the Subject Shares set forth opposite his or its name on Schedule
     A attached hereto, free and clear of any claims, liens, encumbrances and
     security interests whatsoever.  The Stockholder does not own, of record or
     beneficially, any shares of capital stock of the Company other than the
     Subject Shares set forth opposite his or its name on Schedule A attached
     hereto.  The Stockholder has the sole right to vote such Subject Shares,
     and none of such Subject Shares is subject to any voting trust or other
     agreement, arrangement or restriction with respect to the voting of such
     Subject Shares, except as contemplated by this Agreement.

          2.  Representation and Warranty of Purchaser and Merger Sub.
              -------------------------------------------------------  
Purchaser and Merger Sub each hereby represents and warrants to each Stockholder
that it has all requisite power and authority to enter into this Agreement and
to consummate the transactions contemplated hereby.  This Agreement has been
duly and validly authorized, executed and delivered by each of Purchaser and
Merger Sub and constitutes the valid and binding obligation of each of Purchaser
and Merger Sub enforceable against each of Purchaser and Merger Sub in
accordance with its terms.  Neither the execution and delivery by each of
Purchaser and Merger Sub of this Agreement nor the consummation by each of
Purchaser and Merger Sub of the transactions contemplated hereby will: (a)
                                                                        - 
violate or conflict in any material respect with, result in a breach of any
material provision of, constitute a default (or an event which, with notice or
lapse of time or both, would constitute a default) under, result in the
termination or in a right of termination of, accelerate the performance required
by or benefit obtainable under, result in the vesting, 

                                       2
<PAGE>
 
triggering or acceleration of any payment or other obligations pursuant to, or
result in there being declared void, voidable, subject to withdrawal, or
without further binding effect, any of the terms, conditions or provisions of
any note, bond, mortgage, indenture, deed of trust or any material license,
franchise, permit, lease, contract, agreement or other instrument, commitment
or obligation to which each of Purchaser and Merger Sub is a party, by which
each of Purchaser and Merger Sub or any of its properties is bound, or under 
which each of Purchaser and Merger Sub or any of its properties is entitled to 
a benefit; (b) other than the filings required under the HSR Act or any 
            -                
Exchange Act filings, require any consent, approval or authorization of, or
declaration, filing or registration with, any Governmental Entity; or (c)
                                                                       - 
violate in any material respect any Laws applicable to each of Purchaser and
Merger Sub.

          3.  Covenants of Each Stockholder.  Until the termination of this
              -----------------------------                                
Agreement in accordance with Section 7, each Stockholder severally and not
jointly agrees as follows:

          (a)  At any meeting of Stockholders of the Company called to vote upon
     the Merger and the Merger Agreement or at any adjournment thereof or in any
     other circumstances upon which a vote, consent or other approval (including
     by written consent) with respect to the Merger and the Merger Agreement is
     sought, the Stockholder shall vote (or cause to be voted) the Subject
     Shares in favor of the Merger, the adoption by the Company of the Merger
     Agreement (as it may be amended from time to time, provided that such
     amendment is not materially adverse to such Stockholder) and the approval
     of the terms thereof and each of the other transactions contemplated by the
     Merger Agreement.  Any vote cast in accordance with this Section 3(a) or in
     accordance with Section 3(b) shall be cast in such manner as will insure
     that such vote is duly counted for purposes of determining whether a quorum
     is present and for purposes of determining the result of such vote.

          (b)  (i)  At any meeting of Stockholders of the Company or at any
     adjournment thereof or in any other circumstances upon which the
     Stockholder's vote, consent or other approval is sought, the Stockholder
     shall vote (or cause to be voted) the Subject Shares against (A) any
                                                                   -     
     Acquisition Proposal as such term is defined in Section 7.1(a) of the
     Merger Agreement or (B) any amendment of the Company's certificate of
                          -                                               
     incorporation or by-laws or other proposal or transaction involving the
     Company, which amendment or other proposal or transaction would be
     reasonably likely to impede, frustrate, prevent or nullify the Merger, the
     Merger Agreement (as it may be amended from time to time, provided such
     amendment is not materially adverse to such Stockholder), or any of the
     other transactions contemplated by the Merger Agreement or change in any
     manner the 

                                       3
<PAGE>
 
     voting rights of the Common Stock. The Stockholder further agrees not to
     enter into any agreement inconsistent with the foregoing.

          (ii)  At any meeting of Stockholders of the Company or at any
     adjournment thereof or in any other circumstances upon which the
     Stockholder's vote, consent or other approval is sought, the Stockholder
     shall vote (or cause to be voted) the Subject Shares (A) in favor of any
                                                           -                 
     proposal approving any of the transactions contemplated by the Asset and
     Subsidiary Stock Option Agreement (the "Option Agreement"), dated the date
                                             ----------------                  
     hereof, between the Company and Purchaser, and (B) against any proposal or
                                                     -                         
     transactions that would be reasonably likely to impede, frustrate, prevent
     or nullify the Option Agreement or any transactions contemplated thereby.

          (c)  The Stockholder shall not, prior to the earliest of (i) the
                                                                    -     
     Effective Time and (ii) the termination of the Merger Agreement in
                         --                                            
     accordance with its terms, (x) sell, transfer, give, pledge, assign or
                                 -                                         
     otherwise dispose of (including by gift) (collectively, "Transfer"),
                                                              --------   
     consent to any Transfer of, any or all of such Stockholder's Subject Shares
     or any interest therein or enter into any contract, option or other
     arrangement (including any profit sharing arrangement) with respect to the
     Transfer of, the Subject Shares to any person other than pursuant to the
     terms of the Merger or (y) enter into any voting arrangement, whether by
                             -                                               
     proxy, voting agreement or otherwise, in connection with, directly or
     indirectly, any Acquisition Proposal and agrees not to commit or agree to
     take any of the foregoing actions.

          (d)  In the event that Purchaser, Merger Sub or any affiliate thereof
     commences a tender offer for all or any portion of the Common Stock at a
     purchase price per share equal to or greater than the Merger Consideration,
     such Stockholder shall validly tender such Stockholder's Subject Shares and
     shall not withdraw Subject Shares so tendered.

          (e)  Until after the Merger is consummated or the Merger Agreement is
     terminated, the Stockholder shall use reasonable efforts to take, or cause
     to be taken, all actions, and to do, or cause to be done, and to assist and
     cooperate with the other parties in doing, all things necessary, proper or
     advisable to consummate and make effective, in the most expeditious manner
     practicable, the Merger and the other transactions contemplated by the
     Merger Agreement (as it may be amended from time to time, provided such
     amendment is not materially adverse to such Stockholder).

                                       4
<PAGE>
 
          (f)  Such Stockholder, and any beneficiary of a revocable trust for
     which such Stockholder serves as trustee, shall not take any action to
     revoke or terminate such trust or take any other action which would
     restrict, limit or frustrate in any way the transactions contemplated by
     this Agreement.  Each such beneficiary hereby acknowledges and agrees to be
     bound by the terms of this Agreement applicable to it.

          4.  Further Assurances.  Each Stockholder will, from time to time,
              ------------------                                            
execute and deliver, or cause to be executed and delivered, such additional or
further consents, documents and other instruments as Purchaser may reasonably
request for the purpose of effectively carrying out the transactions
contemplated by this Agreement.

          5.  Certain Events.  Each Stockholder agrees that this Agreement and
              --------------                                                  
the obligations hereunder shall attach to such Stockholder's Subject Shares and
shall be binding upon any person or entity to which legal or beneficial
ownership of such Subject Shares shall pass, whether by operation of law or
otherwise, including without limitation such Stockholder's heirs, guardians,
administrators or successors.  In the event of any stock split, stock dividend,
merger, reorganization, recapitalization or other change in the capital
structure of the Company affecting the Company Common Stock, or the acquisition
of additional shares of Company Common Stock or other voting securities of the
Company by any Stockholder, the number of Subject Shares listed in Schedule A
beside the name of such Stockholder shall be adjusted appropriately and this
Agreement and the obligations hereunder shall attach to any additional shares of
Company Common Stock or other voting securities of the Company issued to or
acquired by such Stockholder.

          6.  Assignment.  Neither this Agreement nor any of the rights,
              ----------                                                
interests or obligations hereunder shall be assigned by any of the parties
without the prior written consent of the other parties, except that Merger Sub
or Purchaser (or both of them) may assign, as contemplated by Section 10.3 of
the Merger Agreement, in its sole discretion, any and all of its rights,
interests and obligations hereunder to any affiliate, provided that Merger Sub
or Purchaser will remain liable for its obligations hereunder in the event of
any assignment pursuant to this Section 6.  Subject to the preceding sentence,
this Agreement will be binding upon, inure to the benefit of and be enforceable
by the parties and their respective successors and assigns.

          7.  Termination.  This Agreement, and all rights and obligations of
              -----------                                                    
the parties hereunder, shall terminate upon the date upon which the Merger
Agreement is terminated in accordance with its terms, provided that if the
                                                      --------            
Merger Agreement has been terminated for any reason, Sections 3(b)(ii), 4, 5, 6,
7, 8, 9, 10 and 11 shall survive for one year following such termination.

                                       5
<PAGE>
 
          8.  Grant of Irrevocable Proxy; Appointment of Proxy.  (a)  Each
              -------------------------------------------------           
Stockholder hereby irrevocably grants to, and appoints, Purchaser and William
Recker in his capacity as an officer of Purchaser, and any individual who shall
hereafter succeed to such office of Purchaser, and each of them individually,
such Stockholder's proxy and attorney-in-fact (with full power of substitution),
for and in the name, place and stead of such Stockholder, to vote such
Stockholder's Subject Shares, or grant a consent or approval in respect of such
Subject Shares (i) in connection with any of the matters set forth in Sections
                -                                                             
3(a) and 3(b), and (ii) against any transaction or proposal that would be
                    --                                                   
reasonably likely to result in a breach of any covenant, representation or
warranty or any other obligation or agreement of the Company under or with
respect to the Merger Agreement (as it may be amended from time to time,
provided such amendment is not materially adverse to such Stockholder), the
Option Agreement, the Merger or any of the transactions contemplated by the
Merger Agreement or the Option Agreement.

          (b) Such Stockholder represents that any proxies heretofore given in
respect of such Stockholder's Subject Shares are not irrevocable, and that any
such proxies are hereby revoked.

          (c) Such Stockholder hereby affirms that the irrevocable proxy set
forth in this Section 8 is given in connection with the execution of the Merger
Agreement, and that such irrevocable proxy is given to secure the performance of
the duties of the Stockholder under this Agreement.  Such Stockholder hereby
further affirms that the irrevocable proxy is coupled with an interest and may
under no circumstances be revoked.  Such Stockholder hereby ratifies and
confirms all that such irrevocable proxy may lawfully do or cause to be done by
virtue hereof.  Such irrevocable proxy is executed and intended to be
irrevocable in accordance with the provisions of Section 212(e) of the DGCL.

          9.  General Provisions.
              ------------------ 

          (a)  Amendments.  This Agreement may not be amended except by an
           -   ----------                                                 
     instrument in writing signed by each of the parties hereto.

          (b)  Notice.  All notices and other communications hereunder shall be
           -   ------                                                          
     in writing and shall be deemed given if hand delivered or sent by overnight
     courier (providing proof of delivery) to Purchaser or Merger Sub in
     accordance with Section 10.2 of the Merger Agreement and to the
     Stockholders at their respective addresses set forth on Schedule A attached
     hereto (or at such other address for a party as shall be specified by like
     notice).

                                       6
<PAGE>
 
          (c)  Interpretation.  When a reference is made in this Agreement to
           -   --------------                                                
     Sections, such reference shall be to a Section to this Agreement unless
     otherwise indicated.  The headings contained in this Agreement are for
     reference purposes only and shall not affect in any way the meaning or
     interpretation of this Agreement.  Wherever the words "include", "includes"
     or "including" are used in this Agreement, they shall be deemed to be
     followed by the words "without limitation".

          (d)  Counterparts.  This Agreement may be executed in one or more
           -   ------------                                                
     counterparts, all of which shall be considered one and the same agreement,
     and shall become effective when one or more of the counterparts have been
     signed by each of the parties and delivered to the other party, it being
     understood that each party need not sign the same counterpart.

          (e)  Entire Agreement; No Third-Party Beneficiaries.  This Agreement
           -   ----------------------------------------------                 
     (including the documents and instruments referred to herein) (i)
                                                                   - 
     constitutes the entire agreement and supersedes all prior agreements and
     understandings, both written and oral, among the parties with respect to
     the subject matter hereof and (ii) is not intended to confer upon any
                                    --                                    
     person other than the parties hereto any rights or remedies hereunder.

          (f)  Governing Law.  This Agreement shall be governed by, and
           -   -------------                                           
     construed in accordance with, the laws of the State of Delaware regardless
     of the laws that might otherwise govern under applicable principles of
     conflicts of law thereof.

          (g)  Voidability.  If prior to the execution hereof, the Board of
           -   -----------                                                 
     Directors of the Company shall not have duly and validly authorized and
     approved this Agreement, the Merger Agreement and the transactions
     contemplated hereby and thereby, so that the execution and delivery hereof
     by Purchaser or Merger Sub would trigger the provisions of Section 203 of
     the DGCL, then this Agreement shall be void and unenforceable until such
     time as such authorization and approval shall have been duly and validly
     obtained.

          10.  Stockholder Capacity.  No person executing this Agreement who is
               --------------------                                            
or becomes during the term hereof a director or officer of the Company makes any
agreement or understanding herein in his capacity as such director or officer.
Each Stockholder signs solely in his capacity as the record holder and
beneficial owner of, or the trustee of a trust whose beneficiaries are the
beneficial owners of, such Stockholder's Subject Shares and nothing herein shall
limit or affect any actions taken by a Stockholder in his capacity as an officer
or director of the Company.

                                       7
<PAGE>
 
          11.  Enforcement.  The parties agree that irreparable damage would
               -----------                                                  
occur in the event that any of the provisions of this Agreement were not
performed in accordance with their specific terms or were otherwise breached.
It is accordingly agreed that the parties shall be entitled to an injunction or
injunctions to prevent breaches of this Agreement and to enforce specifically
the terms and provisions of this Agreement in any court of the United States
located in the State of Delaware or in a Delaware state court, this being in
addition to any other remedy to which they are entitled at law or in equity. In
addition, each of the parties hereto (a) consents to submit such party to the
                                      -                                      
personal jurisdiction of any Federal court located in the State of Delaware or
any Delaware state court in the event any dispute arises out of this Agreement
or any of the transactions contemplated hereby, (b) agrees that such party will
                                                 -                             
not attempt to deny or defeat such personal jurisdiction by motion or other
request for leave from any such court, (c) agrees that such party will not bring
                                        -                                       
any action relating to this Agreement or the transactions contemplated hereby in
any court other than a Federal court sitting in the state of Delaware or a
Delaware state court and (d) waives any right to trial by jury with respect to
                          -                                                   
any claim or proceeding related to or arising out of this Agreement or any of
the transactions contemplated hereby.

          12.  Public Announcements.  Each Stockholder will consult with
               --------------------                                     
Purchaser before issuing, and provide Purchaser with the opportunity to review
and comment upon, any press release or other public statements with respect to
the transactions contemplated by this Agreement and the Merger Agreement, and
shall not issue any such press release or make any such public statement prior
to such consultation, except as may be required by applicable law, court process
or by obligations pursuant to any listing agreement with any national securities
exchange (including, but not limited to, NASDAQ).

          13.  Legends.  Each Stockholder will, promptly after executing and
               -------                                                      
delivering this Agreement, deliver to the Company (or its transfer agent, if so
directed by the Company) the certificates representing the Subject Shares, which
certificates (or replacements thereof) shall be returned to such Stockholder in
accordance with Section 7.11 of the Merger Agreement with the following
restrictive legend placed thereon:

          "THE SECURITIES REPRESENTED BY THIS 
          CERTIFICATE ARE SUBJECT TO A STOCKHOLDERS 
          AGREEMENT DATED AS OF OCTOBER 6, 1998, AND, 
          PURSUANT TO THE TERMS THEREOF, MAY NOT 
          BE SOLD, TRANSFERRED, GIVEN, PLEDGED,
          ASSIGNED OR OTHERWISE DISPOSED OF, AND 
          ARE SUBJECT TO FURTHER RESTRICTIONS 
          REGARDING, AMONG OTHER THINGS, VOTING 

                                       8
<PAGE>
 
          RIGHTS AND CERTAIN INDIRECT TRANSFERS AS 
          SET FORTH IN SUCH STOCKHOLDERS 
          AGREEMENT"

                                       9
<PAGE>
 
          IN WITNESS WHEREOF, Purchaser, the Merger Sub and the Stockholders
have caused this Agreement to be duly executed and delivered as of the date
first written above.

                         GRETAG IMAGING GROUP, INC.

                         By: /s/ Dr. Eduard Brunner
                            ------------------------    
                             Name:  Dr. Eduard Brunner
                             Title: Treasurer


                         GRETAG ACQUISITION CORP.

                         By: /s/ Dr. Eduard Brunner
                            ------------------------    
                             Name:  Dr. Eduard Brunner
                             Title: Treasurer


                         RAKESH KUMAR
                         
                          /s/ Rakesh Kumar
                         ---------------------------

                         MARC WILLARD

                          /s/ Marc Willard
                         ---------------------------

                         NORWEST EQUITY PARTNERS IV

                         By: Promod Haque
                            ------------------------    
                                Name:  Promod Haque
                                Title:  Partner


                         MERRILL PICKARD ANDERSON
                              & EYRE IV, L.P.

                         By: /s/ Steven L. Merrill
                            -----------------------
                                Name:  Steven L. Merrill
                                Title: General Partner

                                       10
<PAGE>
 
                                   SCHEDULE A
                                   ----------


 
Name and Address of         Number of Shares of Company       Number of
Stockholder                        Common Stock              Stockholder    
-----------                       Owned of Record              Options   
                                  ---------------              -------
                               
 


Rakesh Kumar                           19,646                   245,000
c/o Raster Graphics, Inc.
3025 Orchard Parkway
San Jose, CA 95134

Marc Willard                          167,523                   175,000
c/o Raster Graphics, Inc.
3025 Orchard Parkway
San Jose, CA 95134

Norwest Equity Partners IV,           857,584                     -0-
a Minnesota Limited
Partnership
245 Lytton Avenue, Suite 250
Palo Alto, CA 94301

Merril Pickard Anderson &             458,281                     -0-
      Eyre IV, L.P.
2480 Sand Hill Road
Suite 200
Menlo Park, CA  94025

                                       11