You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



Xprint in Mozilla

 

Updates

  • Netscape 7.0 has been released with Xprint support on Unix and Linux as a result of this project
  • TrueType font support added to the xprint.mozdev.org 008 Xprint server source tree!
    (Note that this change/upgrade to the Xprint server upgrades existing Mozilla/Netscape 7.0 binaries automagically! :))

Discussion Forum

Discussions related to Xprint are carried out in the newsgroup netscape.public.mozilla.unix. Messages sent to the Mozilla Unix newsgroup are forwarded to the Mozilla Unix mailing list, and vice-versa. You can subscribe or unsubscribe to the mailing list (leave the body blank).

Links

Xprint server and Xprint-enabled Binaries of Mozilla
(Note that the Xprint module is explicitly turned-off in RedHat RPM builds - see bug 133534)

Sample Xprint outputs

The Big Picture

The main priority of the project is be 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 are:
  • 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 localisation (l10n) and per-locale preferences (for example en_US(-like) locales get US-Lettter 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 many accounts (>=80000 accounts should be no problem)
  • Allow easy maintaince 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

Status

Starting with Mozilla 0.9.8 the Xprint module is fully functional and ready for production usage; starting with Mozilla 1.0.1 (BTW: Netscape 7.0 is based on Mozilla 1.0.1) the last major features/bugfixes were completed (tracker bug for that work was bug 149768).
Main focus is now to enhance Xprint's server side (see xprint.mozdev.org) with new features (due the design of Xprint new features added to the server side will automagically "apply" to existing client binaries when they use the new server version...)

Using Xprint for printing in Mozilla

Just print! (this assumes the Xprint server side has been installed and started (Linux users can get it from xprint.mozdev.org) :)
(the usage page has more details... :)

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 maintaince 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-speficic 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... :-)


Maintained by Roland Mainz  <roland.mainz@informatik.med.uni-giessen.de>