| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
| <HTML> |
| <head> |
| <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1"> |
| <TITLE>PSPrint - a Unix print solution</TITLE> |
| <META NAME="GENERATOR" CONTENT="StarOffice/5.2 (Linux)"> |
| <META NAME="AUTHOR" CONTENT="Philipp Lohmann"> |
| <META NAME="CREATED" CONTENT="20010516;17395100"> |
| <META NAME="CHANGEDBY" CONTENT="Philipp Lohmann"> |
| <META NAME="CHANGED" CONTENT="20010517;13400000"> |
| </head> |
| <body BGCOLOR="#ffffff"> |
| <H1>PSPrint - a Unix print solution</H1> |
| <P STYLE="page-break-after: avoid"><FONT FACE="Times New Roman, serif"><FONT SIZE=4><B>History</B></FONT></FONT></P> |
| <P>StarOffice 5.2 (and earlier) relied on a thirdparty solution for |
| printing. This solution could of course not be open sourced as it was |
| a commercial product. So when StarOffice became OpenOffice there was |
| no printing possible at all on the Unix platforms; just a wrapper was |
| provided that contained stubs fitting the missing symbols left in |
| vcl. A new print solution was desperately needed, so a variety of |
| existing print solutions were examined, the most notable of which |
| were gnome-print and Xprint. Gnome-print did not really fit into |
| OpenOffice.org, since it would require to link against a huge amount |
| of other gnome libraries, too, which is unacceptable for |
| OpenOffice.org, because we want to run on many desktops. Xprint was |
| designed as a standard Unix print solution and has many advantages: |
| code for the display would work exactly the same way on the printer. |
| A proof of concept version was created by Martin Maher and Oisin |
| Boydell with help from Hamburg and the US which made it into |
| OpenOffice.org as a temporary solution to have minimal print support |
| on Unix. But Xprint in its current state misses many features that |
| become increasingly important: fast character metric handling, access |
| to glyph substitution tables, easy configurability on a per user |
| basis just to name a few. Also one cannot really say that it has |
| become the standard solution for printing on Unix yet; in fact only |
| recently it was awakened from its long beauty sleep having its major |
| bugs fixed so it is now useable.</P> |
| <P>This led to the decision that as long as there is no standard |
| solution scratching a sufficient number of our itches OpenOffice.org |
| should do like everyone else and produce its own PostScript code. |
| Hence psprint entered the game.</P> |
| <P STYLE="page-break-after: avoid"><FONT FACE="Times New Roman, serif"><FONT SIZE=4><B>Features</B></FONT></FONT></P> |
| <UL> |
| <LI><P>international, multilingual print support through abstraction |
| to Unicode (UCS2).</P> |
| <LI><P>support for vertical writing (mostly for CJK printing)</P> |
| <LI><P>support for TrueType fonts and TrueType collections, embedded |
| as Type3 or Type42</P> |
| <LI><P>support for Type1 fonts</P> |
| <LI><P>support for printer resident fonts</P> |
| <LI><P>size optimized output using font subsetting for TrueType |
| fonts/collections</P> |
| <LI><P>configurable font substitution: replaces fonts that require |
| embedding with printer resident fonts on a per glyph basis</P> |
| <LI><P>use of vertical glyphs through GSUB substitution for TrueType |
| fonts</P> |
| <LI><P>image compression using lzw compression and ascii85 encoding</P> |
| <LI><P>easy user configurability through printer adminstration |
| utility (spadmin)</P> |
| <LI><P>support for printer specific features (everything you can put |
| into a PPD (PostScript Printer Description))</P> |
| <LI><P>support for portable PostScript generation through generic |
| PPD</P> |
| <LI><P>automatic recognition of system printer queues</P> |
| <LI><P>support for pdf conversion and fax (external applications |
| like ghostscript/mgetty+sendfax required)</P> |
| </UL> |
| <P STYLE="page-break-after: avoid"><FONT FACE="Times New Roman, serif"><FONT SIZE=4><B>Overview</B></FONT></FONT></P> |
| <P>PSPrint consists of the following major parts:</P> |
| <UL> |
| <LI><P>Font management: done by the <CODE>PrintFontManager</CODE> |
| class. This class handles font discovery as well as font information |
| like metrics and font properties.</P> |
| <LI><P>Printer management: done by the <CODE>PrinterInfoManager</CODE> |
| class. This class handles printer discovery and information. It can |
| store and load properties of a printer, most important the default |
| job setup (which contains information like paper size, orientation, |
| etc.). To know about a printers capabilities you need PPD |
| (PostScript Printer Description) files which can be parsed with the |
| <CODE>PPDParser</CODE> class.</P> |
| <LI><P>Graphic operations: done by the <CODE>PrinterGfx</CODE> |
| class. This is really the work horse of PSPrint. It handles all |
| kinds of text output, drawing operations, bitmaps and the like.</P> |
| <LI><P>Font subsetting: provided by <A HREF="mailto://alexander.gelfenbain@Sun.COM">Alexander |
| Gelfenbain</A>. This enables PSPrint to make use of TrueType fonts |
| and collections in a very effective way by sending just the glyphs |
| that are needed down to the printer.</P> |
| <LI><P>Job management: done by the <CODE>PrinterJob</CODE> class. |
| This class ties the PostScript code produced by PrinterGfx together |
| downloading the necessary fonts as well as providing a framework for |
| the raw PostScript code.</P> |
| </UL> |
| <P><BR><BR> |
| </P> |
| </body> |
| </HTML> |