Attachment 2 / Anhang 2
 
Project description: Xprint in Mozilla
November 15, 2002
 
Responsible Engineer: Roland
Mainz
 
 
Priority
The main priority of the
project Xprint in Mozilla is to provide a very advanced print module
for Unix/Linux which satisfies all the needs for international printing
(including languages and scripts like Arabic, Chinese, Cyrillic, Greek, Hebrew,
Indic (Devanagari, Tamil, etc.), Japanese, Korean, Polish, etc.).
 
Additional goals
 - Automatic configuration and lookup of available local and
     remote printers (which should work with all spooler systems on all
     supported platforms - this includes CUPS,
     LPRng, AIX, *BSD, HP-UX, Solaris,
     etc.)
 
 - The print dialog should only offer values which are
     supported by the printer (for example: only offer DIN-A0 as paper size if
     the printer only supports printing DIN-A0 - no more DIN-A4 printouts on an
     A0-only poster printer)
 
 - Provide support for localization (l10n) and per-locale
     preferences (for example en_US(-like) locales get US-Letter and de_DE gets
     DIN-A4 as default paper size)
 
 - Support for printing MathML
 
 - Support for printing using TrueType and printer-builtin
     fonts
 
 - Support for printing with any fonts supported by the
     X11 subsystem (e.g. TrueType, PS Type1, PCF, BDF, etc.)
 
 - Support for printing on printers which do not have the
     required fonts installed (e.g. automated font download)
 
 - Support for non-PostScript output like PCL, PDF,
     platform-specific or site-specific solutions
 
 - Provide support for very flexible, fine-grained central
     and/or per-user configuration (e.g. per-user, per-machine, per-network,
     per-locale etc.)
 
 - Provide enterprise features and support for large sites
     (companies, universities etc.) which have to manage many accounts
     (>=80000 accounts should be no problem)
 
 - Allow easy maintenance of the code (Mozilla's Xprint
     module shares ~95% of the source used by the main X11 toolkit, therefore
     most big changes to this layer either applies directly or can be ported
     with minor effort to the Xprint module)
 
 - Provide a full replacement (or alternative :)) for the
     aging PostScript module.
 
 
Implementation
Xprint is separated into
two parts: 
 - The client side - this is Mozilla's Xprint module.
     The client side is mainly responsible as interface between the Xprint code
     and the crossplatform print code in Mozilla. The Xprint API is very
     similar to the core X11 protocol (actually the X11 protocol is being used
     plus a X11 extension to handle the differences between a graphics card and
     a printer (for example: output on graphics cards usually scrolls
     overflowing content while output on a printer uses multiple pages
     instead)), therefore a large amount of source code (~95%) can be shared
     between main toolkit's source and the Xprint code, thus dramatically
     lowering the time required for maintenance or adding new features.
     This code layer is independent from the used flavor of OS and from the
     used Xprint server version, therefore any version of the client side can
     run with any version of the server side. The client does not have to know
     how the destination (e.g. the printer) handles device-specific details,
     this is all abstracted using the Xprint API and offloaded to the server
     side.
     One huge advantage of this approach is that upgrading the server side and
     adding new features (more drivers or new font support) works even with old
     client binaries. And you can even mix different versions of servers on
     different platforms at the same time (one client can use an unlimited
     number of servers and one server can handle an unlimited number of
     printers). 
 - The server side - this is the Xprint server (the binary
     is called "Xprt")
     Xprint's server side - a daemon process (or many - as many you want/need)
     - is where the output generation code (e.g. PostScript, PCL, PDF etc.) and
     the platform-/driver-specific printer, spooler, font and configuration
     repository code resides.
     However, this isn't mozilla.org code not Mozilla-specific code (e.g. the
     Xprint server side can be used from CDE/Motif/Qt/etc.-applications, too) -
     http://xprint.mozdev.org/ has more
     and better docs about these details... :-). 
 
Sample Xprint outputs: http://www.mozilla.org/projects/xprint/samples/
 
Source: http://www.mozilla.org/projects/xprint/